An American diplomat accused by Russia of spying for the CIA was ordered to leave the country Tuesday after a highly publicized arrest that seemed designed to embarrass the United States and its premier intelligence service.

The expulsion of Ryan C. Fogle was announced by the Russian Foreign Ministry, and footage on state-run television showed him wearing a blond-streaked wig and a baseball cap as he was held facedown and handcuffed.

The Soviet-style episode came just days after U.S. Secretary of State John F. Kerry visited the Russian capital in an attempt to soothe diplomatic tensions over the conflict in Syria and the investigation of the Boston Marathon bombing.

A statement released by the Russian Foreign Ministry, which appeared intended to put the United States on the defensive, said, “While our two presidents have reaffirmed their willingness to expand bilateral cooperation, including between intelligence agencies in the fight against terrorism, such provocative Cold War-style actions do not contribute to building mutual trust.”

Fogle, who is listed as a low-level diplomat at the U.S. Embassy in Moscow, was accused of trying to recruit a Russian official to work as a CIA spy. Fogle’s Monday night arrest was captured on videotape and made public Tuesday afternoon just as the U.S. ambassador to Russia, Michael McFaul, was beginning a previously announced question-and-answer session on the social media site Twitter. McFaul said during the exchange that he would not comment on the case.

Russia’s domestic security service, known by the initials FSB, said Fogle was caught with a stack of cash. Images showed a collection of amateurish spy gear, including a compass, sunglasses and a form letter promising million-dollar payments and offering tips on setting up an anonymous e-mail account.

U.S. officials did not dispute that Fogle was a CIA employee, and they sought to play down the potential for any diplomatic fallout.

A CIA spokesman declined to comment. A State Department spokesman, Patrick Ventrell, said only that “an American staff member at the embassy” had been briefly detained.

Melodrama in Moscow

CIA veterans marveled at the theatrical nature of the arrest and likened it to the spy-versus-spy showdowns that were hallmarks of the Cold War.

“It is right out of the 1980s playbook,” said Milton Bearden, who served as chief of the CIA’s Soviet/East Europe Division. “The elaborate drama of the whole thing [indicates] that there was almost certainly an elaborate ambush set up. Cameras at the ready. A well-trained [Russian] take-down team. All made for taking it public on video.”

According to Russian news agencies, Fogle was detained in a residential neighborhood across from a park in southwest Moscow. Video of him being led to a car by FSB officers identifies the location as near a housing compound for foreign diplomats, though it is not clear whether Fogle lives there.

He was turned over Tuesday to the U.S. Embassy, where he is listed as the third secretary in the political section. CIA officers routinely use State Department positions as diplomatic cover for espionage.

Russia’s government-financed RT television channel reported that Fogle’s alleged target was a Russian counterterrorism official working in the North Caucasus region — an allegation that suggests a tie to the Boston bombing.

The investigation of the April 15 attack has focused on whether one of the suspects, Tamerlan Tsarnaev, had become radicalized during a six-month trip to Russia last year. Tsarnaev, who was killed in a shootout with police, and his brother, Dzhokhar, who is in custody, are ethnic Chechens.

The FSB had raised concerns about Tsarnaev with the FBI and the CIA in 2011. But U.S. officials have said that the Russians failed to respond to requests for additional information. The FBI closed its inquiry a year before the attack.

Kerry praised U.S.-Russia cooperation in the Boston investigation before meeting with Russian President Vladi­mir Putin on May 7. The FBI and the FSB also have pledged to work together ahead of the 2014 Winter Olympics in Sochi, Russia.

But experts said that the handling of Fogle’s arrest would have required approval from Putin and that the former chief of the KGB, which preceded the FSB, may have viewed the case as a chance to send a signal that limits to U.S.-Russia cooperation remain.

Despite the melodrama, the episode was not expected to damage bilateral relations. Alexei Pushkov, head of the international affairs committee of the lower house of the Russian parliament, said on Twitter that “the spy scandal around the U.S. diplomat will, I think, be fleeting. . . . But the atmosphere is not improving.”

A case with many oddities

The case is the latest in a long history of tit-for-tat expulsions between U.S. and Russian spy agencies. The most recent occurred three years ago, when the FBI announced arrests of a network of 10 alleged Russian “sleeper spies” in the United States. They were sent back to Russia as part of a swap in which the United States secured the release of four alleged spies who had been held by Moscow.

Public records indicate that Fogle is a native of Missouri and a graduate of Colgate University in New York. A woman who answered the phone at his parents’ residence in St. Louis declined to comment.

Images of Fogle released by Russia show a youthful American wearing a blue-checked shirt and a grim countenance seated at a table in an FSB office, as well his diplomatic identity card, a stack of 500-euro notes and a cellphone.

The paraphernalia prompted comparisons to the 1960s spy spoofs on television. “Who uses a compass these days?” asked Mark Galeotti, a New York University professor who studies Russian security affairs.

The oddest artifact was the letter, which CIA veterans said reminded them of missives they used to draft in disappearing ink.

“Dear friend,” it begins, according to a translation, and goes on to promise an initial payment of $100,000 and annual payments of up to $1 million “for long-term cooperation, with extra bonuses if we receive some helpful information.”

The sums seem excessive for an agency accused of offering as little as $400 to a Russian official in a 2001 case. The letter explains how to open a Gmail account and provides an address for sending messages before concluding with “Your friends.”

Miller reported from Washington. Kathy Lally in Moscow and Anne Gearan and Julie Tate in Washington contributed to this report.