Maria Butina’s arrest mugshot.

A Russian woman who tried to ingratiate herself with American political conservatives ahead of the 2016 election was sentenced on Friday to 18 months in prison by a federal judge.

Maria Butina was sentenced by  Judge Tanya Chutkan of the U.S. District Court for the District of Columbia on a single count that she conspired to act as an unregistered Russian agent. Butina pleaded guilty in December in exchange for federal prosecutors dropping a second charge against her.

After Butina spoke Friday expressing remorse for her actions, Chutkan ordered the 18-month sentence. Butina also will be deported back to Russia “promptly” after she completes her sentence. She has already served nine months in jail, for which she’ll be credited.

The sentence marks a win for prosecutors, who had sought an 18 month-sentence for Butina. Her defense attorneys—McGlinchey Stafford partner Robert Driscoll and associate Alfred Carry—sought a sentence of time served and an order for her immediate deportation to Russia.

In handing down the sentence, Chutkan said that it “may be true” that, if Butina had notified the Justice Department, her conduct would have been legal. “But it’s because she did not register that her conduct was so dangerous and a threat to our country’s democratic institutions.”

The judge noted that she certainly agreed that Butina, who came to the U.S. as a graduate student at American University, was “a legitimate and hard working student.” At the same time, Chutkan said she was “not simply seeking to learn about the U.S. political system.”

Nor was Butina’s offense a mere failure to register with the government, the judge said. Chutkan described how Butina sought to gain connections with organizations for Russia’s benefit, at a time when Russia was acting to interfere and affect the American political process. Chutkan stressed that her conduct was “sophisticated.”

“This was not a simple misunderstanding by an overeager foreign student,” Chutkan said. Before she handed her sentence, she told Butina: “You’re a young woman, you’re smart. … You have a future ahead of you, I wish you the best of luck.”

Friday’s hearing drew to a close a months long legal saga for Butina, who admitted she worked at a former Russian government official’s direction as she cozied up to powerful conservatives and National Rifle Association members in an effort to influence U.S. policy toward Russia. Butina initially pleaded not guilty last summer to charges relating to her unregistered work at the behest of Alexander Torshin, a former deputy governor of Russia’s central bank.

Butina’s case drew wide interest and fueled public speculation that she was a Russian spy. Even in the week leading up to Friday’s sentencing, there were renewed questions of whether Butina’s work amounted to espionage, as the government pushed an 18-month sentence for her. Her defense attorneys sought a sentence of time served and her immediate deportation back to Russia.

Federal prosecutors last week filed a declaration from a former FBI counterintelligence official who described how Russian intelligence could benefit from the information Butina provided them.

The official, David Anderson, said Russian intelligence services could use Butina’s information “for years to come in their efforts to spot and assess Americans who may be susceptible to recruitment as foreign intelligence assets.”

Butina’s defense attorneys accused the filing of raising a “wholly new theory of espionage activity” at the eleventh hour, and sought to strike the declaration from the record. Chutkan on Thursday denied that motion, noting Butina’s attorneys “had notice” of prosecutors’ intent to use the FBI official as a witness or to submit a declaration from him, since April 10.