Maria Butina, the Russian woman who was accused of being a secret agent for the Russian government, was sentenced to 18 months in prison Friday by a federal judge in Washington after pleading guilty last year to a conspiracy charge.

Butina, who has already served nine months behind bars, will get credit for time served and can possibly get credit for good behavior, the judge said. She will be removed from the U.S. promptly on completion of her time, the judge added, and returned to Russia.

MARIA BUTINA, ACCUSED RUSSIAN SPY, PLEADS GUILTY TO CONSPIRACY

An emotional and apologetic Butina said in court Friday she is “truly sorry” and regrets not registering as a foreign agent.

“I feel ashamed and embarrassed,” she said, adding that her “reputation is ruined.”

Butina has been jailed since her arrest in July 2018. She entered the court Friday wearing a dark green prison jumpsuit and spoke in clear English, with a slight Russian accent.

“Please accept my apologies,” Butina said.

Butina’s lawyer, Robert Driscoll, said after the sentencing they had hoped for a “better outcome,” but expressed a desire for Butina to be released to her family by the fall.

Prosecutors had claimed Butina used her contacts with the National Rifle Association and the National Prayer Breakfast to develop relationships with U.S. politicians and gather information for Russia.

Prosecutors also have said that Butina's boyfriend, conservative political operative Paul Erickson, identified in court papers as "U.S. Person 1," helped her establish ties with the NRA.

WHO IS MARIA BUTINA, THE RUSSIAN WOMAN ACCUSED OF SPYING ON US?

In their filings, prosecutors claim federal agents found Butina had contact information for people suspected of being employed by Russia's Federal Security Services, or FSB, the successor intelligence agency to the KGB. Inside her home, they found notes referring to a potential job offer from the FSB, according to the documents.

Investigators recovered several emails and Twitter direct message conversations in which Butina referred to the need to keep her work secret and, in one instance, said it should be "incognito." Prosecutors said Butina had contact with Russian intelligence officials and that the FBI photographed her dining with a diplomat suspected of being a Russian intelligence agent.

Fox News’ Jason Donner, Bill Mears, Greg Norman and the Associated Press contributed to this report.