MOSCOW — A U.S. diplomat disguised in a blond wig was caught trying to recruit a Russian counterintelligence officer in Moscow, Russia’s security services announced Tuesday, claiming the American was a CIA officer.

Ryan Fogle, a third secretary at the U.S. Embassy in Moscow, was carrying special technical equipment, disguises, written instructions and a large sum of money when he was detained overnight, Russia’s Federal Security Service said.

The FSB, the successor agency to the Soviet-era KGB, said Fogle was trying to recruit a Russian counterterrorism officer who specializes in the volatile Caucasus region in south Russia, home to the two Boston Marathon bombing suspects.

Fogle was handed over to U.S. Embassy officials, declared persona non grata and ordered to leave Russia immediately, the Foreign Ministry said. He has diplomatic immunity, which protects him from arrest.

It was the first case of an American diplomat publicly accused of spying in about a decade.

The Foreign Ministry summoned Ambassador Michael McFaul to appear Wednesday in connection with the case. McFaul, who was doing a question-and-answer session on Twitter when the detention was announced, said he would not comment on the spying allegation.

Russia’s Caucasus region includes the provinces of Chechnya and Dagestan. The suspects in the Boston Marathon bombings are ethnic Chechen brothers and the elder brother spent six months last year in Dagestan, now the center of an Islamic insurgency against Russian authority.

U.S. investigators have been working with the Russians to try to determine whether suspected Boston bomber Tamerlan Tsarnaev had established any contacts with the militants operating in Dagestan.

Russian officials expressed indignation Tuesday that the U.S. would carry out such an espionage operation at a time when the presidents of the two countries have been working to improve counterterrorism cooperation.

Despite the end of the Cold War, Russia and the United States still maintain active espionage operations against each other. Last year, several Russians were convicted in separate cases of spying for the U.S. and sentenced to lengthy prison sentences.

On Tuesday, Russian state television showed pictures of a man said to be Fogle, wearing a baseball cap and what appeared to be a blond wig, lying face down on the ground. The man, without the wig, was also shown sitting at a desk in the offices of the FSB. Two wigs, a compass, a map of Moscow, a pocket knife, three pairs of sunglasses and packages of 500 euro notes were among the items authorities displayed on a table.