New York Times reporter Matthew Rosenberg. (The New York Times)

Afghanistan’s attorney general banned a New York Times reporter from leaving the country Tuesday pending an investigation into a controversial story about purported plans by unidentified officials to take power if a political crisis continues.

Matthew Rosenberg, 40, said Tuesday night that he was summoned to the attorney general’s office in the afternoon and asked numerous questions about the story. He said he rejected requests to reveal his sources and was told to return the next day with a lawyer to face more questions.

“They did not explicitly tell me I couldn’t leave the country, but it was clear I was not free to go,” Rosenberg said. He said he was questioned by three men who were “polite but insistent” and who seemed equally concerned by the “idea” of the story and which officials and political leaders had spoken with him.

Times international editor Joe Kahn later said in a statement: “The Afghan attorney general’s office has advised Matthew Rosenberg that he must remain in Afghanistan while an investigation into his article is ongoing. We are eager to work with the Afghan authorities to resolve any concerns about the article, which we feel is fair and accurate.”

A spokesman for Afghan Attorney General Muhammad Ishaq Aloko told The Washington Post late Tuesday that Rosenberg was summoned to “clarify” his story and the sources he had quoted.

The spokesman, Basir Azizi, said the Times story, which suggested that the officials’ plans might amount to a coup d’etat, could “create fear and confusion among the people” and that Rosenberg could not leave the country until the matter had been investigated.

Rosenberg said he was “really confident” in the accuracy of his story, which said a number of government officials and other leaders with close ties to Afghan security forces were preparing to install their own interim government if the country’s current election impasse remained unresolved. 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.

The New York-based Committee to Protect Journalists said it was “alarmed” by the travel ban and called on Afghan authorities to lift all restrictions on Rosenberg. “Denying journalists freedom of movement is nothing more than a form of intimidation at a time when Afghanistan’s democracy is most in need of independent political reporting,” CPJ Deputy Director Robert Mahoney said in a statement.

Paul Farhi in Washington contributed to this report.