New York Times correspondent Matthew Rosenberg has been asked to leave Afghanistan after he refused to identify sources for a story on a plan by senior officials to seize power. (Shah Marai/AFP/Getty Images)

Afghanistan on Wednesday ordered a New York Times reporter to leave the country within 24 hours after he refused to identify sources for an article he wrote about a plan by unnamed officials to seize power if the country’s political crisis drags on.

President Hamid Karzai said in a statement that Matthew Rosenberg’s article was a sign of “meddling and interference of foreigners for destabilizing Afghanistan.” The country has been gripped by political deadlock since a presidential election in April failed to produce an outright winner and a subsequent runoff in June led to fraud charges and a protracted recount.

Rosenberg, 40, who has covered Afghanistan for three years, was summoned Tuesday by the attorney general’s office and asked to name his sources for the article published in that day’s Times. Later Tuesday, the attorney general’s spokesman, Basir Azizi, said Rosenberg was barred from leaving Afghanistan pending an investigation.

“He was not cooperative in the investigation process and refused to name those he had quoted in his story as senior or high-ranking officials without releasing their names,” Azizi said Wednesday. “And today it was decided that he has to leave the country within 24 hours and not come back again.”

Azizi said the Times story, which suggested that the officials’ plan might amount to a coup d’etat, was against Afghan national interests. The article said the officials hoped that the mere threat of such a takeover would prompt presidential candidates Abdullah Abdullah and Ashraf Ghani to compromise and end the crisis.

Azizi said the article was the latest among some “untrue” reports that the paper has published about the elections in the past few months.

In Washington, State Department spokeswoman Marie Harf condemned the Afghan government decision. “This is a significant step backward for the freedom of expression in Afghanistan that may well be unprecedented there,” Harf said. “We urge the government of Afghanistan to reverse this decision.”

The Times on Tuesday cited previous complaints from Afghan officials about its coverage, including one in April from Karzai’s office that objected to an article’s characterization of him as “concerned about the apparent success of Mr. Abdullah,” who ran against Karzai unsuccessfully in a 2009 presidential election marred by widespread fraud. The Afghan information minister ultimately dismissed the previously unpublicized complaint as “groundless” and said the use of confidential sources was protected under Afghan law, the Times reported.

A more recent article co-authored by Rosenberg, citing anonymous senior officials, reported that Karzai was thought to be favoring Ghani as president in the disputed poll results, the Times noted.

The Times’ bureau chief in Kabul, Rod Nordland, said that the expulsion order came as a surprise to him and that the paper was not officially informed about it.

“He is happy to come back and undergo their questioning on this issue but wants an attorney present,” Nordland said.

If implemented, the expulsion would be the first of a Western journalist since Karzai took office after the fall of the Taliban government in late 2001. Freedom of the press has been touted as one of the main achievements of Karzai’s government.

Dean Baquet, the Times’ executive editor, criticized the Afghan government’s action, the newspaper reported Wednesday.

“Matt is a terrific reporter who reported an accurate story,” Baquet said. “He was perfectly willing to talk to the Afghan government but obviously wasn’t going to reveal his sources.” Baquet said that Rosenberg would continue to report on Afghanistan and that “we’re appalled that a government would kick a reporter out for doing his job,” the Times reported.

Joe Kahn, international editor at the Times, said that several of the paper’s reporters rotate into Kabul and that “we intend to continue covering the country.” He said Rosenberg “was not, as far as I know, detained” but was told he could not leave Afghanistan when he was called in for questioning Tuesday.

“Today, that instruction was reversed and he was told to leave the country, though we are still awaiting a legal order of expulsion, which has not yet been produced,” Kahn said.

Paul Farhi in Washington contributed to this report.