MOSCOW — An American citizen has been detained in Moscow on espionage charges, Russia’s domestic security agency said Monday, just a few weeks after a Russian operative was convicted of conspiracy in the United States.

In a brief statement, the Russian agency said that an American, identified as Paul Nicholas Whelan, had been taken into custody on Friday on suspicion of spying. The statement implied that he had been caught red-handed, saying that the arrest had occurred “during an act of espionage.”

A criminal case has been opened against Mr. Whelan, said the statement from the F.S.B., or Federal Security Service, which gave no other details. Under Russian law, convictions in spying cases can carry prison terms of up to 20 years.

In a statement, Mr. Whelan’s family identified him as a former Marine. He was in Moscow to attend a wedding but had not been in contact with his family since Friday, the statement said, describing his silence as something that was “very much out of character for him even when he was traveling.”