The Islamic State (Isil) is already sending "advance guards" to Afghanistan and could expand into the war-torn country if the US withdraws too quickly, the new Afghan president warned today.
A day after successfully lobbying Barack Obama to slow the withdrawal of American troops from Afghanistan, Ashraf Ghani used a speech to the US Congress to raise the spectre of Isil extending into his country as it did in Iraq.
"We are the front line," Mr Ghani told members of Congress as he urged the US to continue its military and economic support for Afghanistan. "[Isil] is already sending advance guards to southern and western Afghanistan to test our vulnerabilities."
The Afghan leader, who took office last year after a divisive election, spoke during a visit to Washington intended to show that he will be a more cooperative partner to America than his predecessor, Hamid Karzai.
While the mercurial Mr Karzai often lashed out at the West in public and infuriated the White House, Mr Ghani has gone to great lengths to praise the US and note the sacrifices it has made on behalf of Afghanistan.
His approach has already paid dividends and on Tuesday Mr Obama announced that he was agreeing to the Afghan leader's request not to withdraw any US troops this year.
The White House had originally planned to cut the size of US forces from its current level of 9,800 to about 5,000 by the end of the 2015.
The US troop presence will now remain at 9,800 through the rest of the year, although Mr Obama said he was still committed to withdrawing American forces by the end of 2016, leaving behind a small force to guard the US embassy.
The decision was also reportedly motivated by a desire to continue operating drone bases in Afghanistan to carry out strikes against al-Qaeda targets in Pakistan.
The original timetable for withdrawal would have forced the CIA to close some of its drone facilities, according to the New York Times. By leaving more American forces in the country, the White House has bought the CIA more time to continue its aerial campaign suspected terrorists.
The Taliban warned that the decision to slow down the withdrawal would only hamper peace its negotiations with the government in Kabul and prolong the fighting in Afghanistan.
"This damages all the prospects for peace. This means the war will go on until they are defeated," a Taliban spokesman told Agence France Presse.
The Taliban has publicly insisted that it will not negotiate while foreign troops are still in the country but dialogue is taking place through private channels.
Mr Ghani said that US training and support for the Afghan army were paying dividends on the battle field and promised "we will negotiate with the Taliban from a position of strength, not weakness".
The Afghan leader painted a generally optimistic picture of development in his country, pointing to the three million Afghan girls in schools and the rise in life expectancy from 44 to 60 since 2002.
However, he warned that more than a decade after the September 11 attacks and the US-led invasion his country was still needed support in the fight against terrorism.
"Afghanistan is carrying forward everyone's fight by containing this threat," he said.
He promised that while Afghanistan continues to take billions of dollars from foreign donors, it had no interest in "perpetuating a childish dependence" and within a decade would be self-reliant militarily and economically.
"Afghanistan can and will be an enduring success. Your support, your understanding and your commitment to our country will not have been in vain. Afghanistan will be the graveyard of al-Qaeda and their foreign terrorist associates," he said.