WASHINGTON — To her friends, Maria Butina was somebody who had nothing to hide.

A 29-year-old recent graduate of American University in Washington, Ms. Butina was upfront about her three great passions: gun rights, President Trump and better relations between the United States and Russia. She posted photographs of her meetings with American politicians, including Gov. Scott Walker of Wisconsin, a Republican, all over social media. She joked about buying a friend high in the Russian government his favorite American toothpaste.

But it was all a ruse, federal prosecutors say, a cover for Ms. Butina to advance Russia’s agenda within the Republican Party. For three years, they said, she was part of a low-cost, low-risk influence operation that was run by the senior Russian official, Alexander Torshin, and was assisted by an unnamed American operative with Republican ties. She is also said to have gotten help from the National Rifle Association, which repeatedly brought Ms. Butina from her native Russia to the United States for events until she obtained a student visa in August 2016.

Ms. Butina, who was indicted Tuesday on charges of conspiracy and acting as a foreign agent, did not register with the Justice Department as a foreign agent. That failure is central to the government’s charges that she violated the federal lobbying law and conspired with Mr. Torshin, the deputy head of Russia’s central bank, to influence American politics on behalf of the Russian government.

In private messages sent via Twitter, Mr. Torshin urged Ms. Butina to play the long game, be coldblooded, and “not burn out prematurely.”