Afghanistan's president says the Islamic State group is "on the run" in an eastern border province where in recent months the militants had taken over some remote districts.

Ashraf Ghani said Tuesday that a "crack division" of the army fought the extremists in Nangarhar. Now fighters who had declared loyalty to IS are dispersing.

Ghani spoke at a joint press conference with the NATO Secretary General, Jens Stoltenberg, who is on a two-day visit to Afghanistan.

The president attributed the success to massive ground operations, close air support and participation of retired commanders who had joined the elite commando division.

Officials have said that the fighters who joined the IS branch in Afghanistan are mostly disaffected Taliban, weary of the insurgency's lack of success in overthrowing the Kabul government.