The White House accidentally revealed the identity of a top CIA official in Afghanistan coinciding with President Barack Obama's surprise visit to US troops deployed in the country over the weekend.

The official's name, identified as 'chief of station' in Kabul, a title used by the CIA for its highest-ranking spy in a country, appeared on a list sent to reporters of senior US officials accompanying the president on his trip to Kabul.

The White House later issued a revised list without the official's name after it was alerted about the error. The list was e-mailed to news organisations covering the president's surprise visit to Bagram air base, near Kabul, to mark Memorial Day.

Download the new Independent Premium app Sharing the full story, not just the headlines

"Initially, the press office raised no objection, apparently because military officials had provided the list to distribute to news organisations," the Washington Post reported "But senior White House officials realised the mistake and scrambled to issue an updated list without the CIA officer's name."

The list was also included in "pool reports" circulated among reporters and shared with foreign media and journalists who were not taking part in the trip. The Post said its Washington bureau chief shared his pool report with more than 6,000 recipients.

President Obama visited US troops serving in Afghanistan to mark Memorial Day, which pays tribute to the fallen and those wounded in war, on Sunday. He did not meet with President Hamid Karzai.