Maria Butina, the Russian operative who used her NRA activism to illegally infiltrate conservative political circles, was sentenced to 18 months in prison by a federal judge Friday.

The 30-year-old American University graduate student pleaded guilty in December to one count of conspiracy to act as an agent of a foreign official. She was arrested in July.

U.S. District Judge Tanya Chutkan gave Butina credit for nine months of time served. The judge ordered her deported as soon as her time is up.

"You have a future ahead of you. I wish you the best luck," the judge said.

Download the NBC News app for breaking news and politics

Butina had faced a maximum of five years behind bars, and the government had asked that she be sentenced to 18 months.

Butina addressed the court and, her voice at times quivering, insisted she wasn't working as a spy, and that she only wanted to mend Russia-U.S. relations.

"I came here to better my life to get a degree. I wished to mend relations while building my resume," she said. "It was for these actions and my own ignorance that I’m here."

Throughout much of her emotional address, Butina held the hand of her defense lawyer Robert Driscoll.

She admitted to harming relations between the two superpowers.

"It has never been my intention to harm American people, but I did so by not notifying your government. It has harmed my attempts to improve relations," she said. “I have three degrees, but now I’m a convicted felon with no money, no job and no freedom.”

“Instead of building peace, I created discord,” she said.

But Chutkan didn't buy Butina's tearful claims of innocent ignorance of the law, saying the Russian operative knew exactly what she was doing.

"She was doing this under the direction of a Russian official ... at a time that Russia was looking to interfere with the U.S. political process," the judge said. “This was no simple misunderstanding by an overeager foreign student."

Maria Butina's sentencing before judge Tanya Chutkan Art Lien

Driscoll said he was disappointed with the judge's sentencing.

"I feel terrible for Maria's family ... I wish we could have done more to get her out sooner," the attorney said. "I do not believe an additional nine months in jail serves any purpose."

The Russian embassy in Washington said Butina "is a political prisoner" and tried to start the hashtag #FreeMariaButina.

"We insist on the innocence of our compatriot," the embassy said in a statement. "We demand her immediate release. We will continue to provide her with comprehensive consular and legal assistance."

In the end, Chutkan urged Butina to think of better days ahead.

"You are not the worst things you've ever done," Chutkan told Butina. "You are a young woman. You are smart, you're hard-working."

Butina admitted to working with her Republican operative boyfriend Paul Erickson — identified in court papers as "U.S. Person 1" — at the behest of a Russian official in order "to establish unofficial lines of communication with Americans having power and influence over U.S. politics … for the benefit of the Russian Federation," according to court papers.

Maria Butina in a police booking photo from 2018. Alexandria Sheriff's Office via Reuters

Butina, in December 2015, helped orchestrate a trip by NRA members to Moscow where they met with Russian Foreign Minister Sergey Lavrov, court papers say.

Defense lawyers had asked Chutkan for no jail time, writing in a sentencing memo that Butina has "always been willing to cooperate with the government."

"Maria's cooperation has been full, transparent and complete. Yet, what makes her case especially noteworthy is that, as a young Russian national who has accepted that deportation will be part of the resolution of her case, Maria has willingly cooperated with the United States despite the geopolitical tension between the two countries," the memo reads.

Prosecutors conceded that "Butina was not a spy in the traditional sense," but said she was still working to the detriment of the United States.

"She was not a trained intelligence officer. But the actions she took were nonetheless taken on behalf of the Russian official for the benefit of the Russian Federation, and those actions had the potential to damage the national security of the United States," according to the government.

CORRECTION (April 26, 2019, 5:45 p.m. ET): An earlier version of this article included an outdated reference to an allegation by prosecutors against Butina. In July 2018, prosecutors said she had offered to trade sex for a position within a special-interest organization. In September, prosecutors said they had misunderstood a text message and withdrew that allegation. The reference has been removed from the article.