Afghanistan has given New York Times reporter Matthew Rosenberg 24 hours to leave the country for not cooperating with an investigation, a statement from the attorney general's office has said.

Rosenberg had been summoned to the attorney general's office for questioning on Tuesday after the newspaper ran a story about officials discussing plans to form an interim government if a deadlock over the presidential election failed to be broken soon.

The correspondent, who has spent three years at the NYT bureau in Kabul, said on Wednesday that the attorney general had not yet contacted him directly about the order to leave.

"They had brought us there under the guise of a kind of semi informal chat," Rosenberg said. "It was kind of polite but insistent that we give them the names of our sources."

Afghanistan is in the midst of a ballot that has dragged on for months, with both candidates claiming victory after the June 14 runoff, and allegations of mass fraud threatening to derail the process.

The report is against our national security because right now, the election problem is ongoing and talks are at a very intricate stage.

Basir Azizi, Spokesperson for Attorney General

"The report is against our national security because right now, the election problem is ongoing and talks are at a very intricate stage,"attorney general spokesman Basir Azizi told Reuters news agency.

Earlier, Afghanistan had banned Rosenberg from leaving the country pending investigation that saw Washington seeeking "respect of fundamental freedoms of expression and expression of the press".

A US State Department spokeswoman Marie Harf urged the Afghan government "to respect fundamental freedoms of expression and expression of the press, and we'll continue to monitor it."

The United Nations is supervising an audit of all eight million votes cast, but the process has proceeded slowly as rival camps scrutinise each vote.

At the same time, members of a joint-commission appointed by deadlocked candidates Abdullah Abdullah and Ashraf Ghani are meeting to hammer out an agreement on a unity government - as agreed in a deal brokered by the US Secretary of State John Kerry, who has twice flown into Kabul since the run off.

International pressure is building on Afghanistan to select the new president by the end of the month, as the pullout of US-led NATO troops continues and Taliban rebels exploit political inertia.

Source: Agencies