A federal judge on Friday sentenced Maria Butina, a Russian gun rights activist who pleaded guilty in December to a conspiracy against the United States, to 18 months in prison.

The term, which includes the nine months Butina has already served, was handed down by U.S. District Judge Tanya S. Chutkan in a courtroom in Washington, D.C.

Butina faced a maximum penalty of five years in prison. Prosecutors recommended a sentence of 18 months, while Butina’s defense argued that her sentence should be time served.

Related Story Rounds Alleged Russian Spy Maria Butina and the NRA: A Photographic History Maria Butina, a Russian national who launched that country's version of the National Rifle Association — and hosted American gun rights advocates in Moscow in 2013 — was charged on Monday with spying for the Russian government.

The judge also granted a request that Butina be deported to Russia at the completion of her sentence.

The 30-year-old Butina has been held in detention in a Northern Virginia facility since her arrest by the FBI last July. She pleaded guilty to acting as an unregistered foreign agent of Russia as a part of her attempts since 2015 to gain influence among conservative individuals and groups, most notably the National Rifle Association.

Butina’s lawyers portrayed her efforts as a genuine attempt at improving U.S.-Russian relations, but prosecutors painted a picture of someone secretly working to advance Russian state interests at the behest of Alexander Torshin, a prominent Russia financier said to have close ties to Russian President Vladimir Putin. As a part of her December plea, Butina admitted to working under the direction of a person later shown to be Torshin.

In their case, prosecutors detailed how Butina used her profile as a gun rights activist in Russia to build connections with leading NRA figures. Butina and Torshin attended multiple NRA conventions and arranged for top NRA officials, including onetime organization president David Keene, to visit Russia.

In 2010, Butina founded the The Right to Bear Arms, a gun rights group, in Moscow with support from Torshin. In 2013, she claimed her organization had entered into a “signed cooperation agreement” with the NRA, according to an account given to The Trace. (The NRA would not confirm if it had ever entered into such an agreement.)

The government had stopped short of accusing Butina of being a spy, but relied on the testimony of a former FBI agent during sentencing last week that her actions were consistent with the early stages of an intelligence recruitment operation.

Butina’s lawyer bristled at the inclusion of the testimony, which they argued amounted to an 11th-hour government attempt to justify a longer sentence. The judge denied the attempt to have the testimony thrown out.

In her December plea deal, Butina agreed to help prosecutors in their investigation in exchange for a reduced sentence.