Image copyright Reuters Image caption Russian President Vladimir Putin says the sentencing of Maria Butina is "an outrage"

Russian President Vladimir Putin has hit out at a US court's sentencing of agent Maria Butina, dubbing it "an outrage" and a "travesty of justice".

Butina was sentenced to 18 months in prison on Friday after trying to infiltrate US political groups in an effort to sway American policies in favour of Moscow.

The 30-year-old had pleaded guilty to conspiring to act as a foreign agent.

But the Russian president said the sentence was an attempt to save face.

In his first public remarks since the sentencing, Mr Putin on Saturday said it was "not clear what she was convicted of or what crime she committed".

"I think it's a prime example of 'saving face.' They arrested her and put the girl in jail. But there was nothing on her, so in order not to look totally stupid they... fixed her up with an 18-month sentence to show that she was guilty of something," he told reporters in Beijing.

What happened in court?

Speaking to the court on Friday, Butina said: "I destroyed my own life."

The Russian gun rights activist had been in custody since her arrest in July.

While initially pleading not guilty, she reversed her position after reaching a deal with prosecutors and admitted to a single count of conspiracy in December.

The judge noted on Friday that Butina had provided "substantial assistance" to law enforcement.

But despite Butina's plea for leniency, the sentencing fully complied with the government's recommendation.

"This was no simple misunderstanding by a overeager foreign student," Judge Chutkan said.

The 18-month sentence includes the nine months Butina has already served. She will face immediate deportation after her sentence is complete.

At the end of the sentencing, Judge Chutkan said she wished Butina "the best of luck."

Image copyright William Hennessy Jr Image caption Butina pleaded guilty after reaching a deal with prosecutors

A crackdown on foreign lobbying

By Tara McKelvey, BBC News

The prosecution of Butina under the foreign agents registration act reflects a trend in law enforcement, one that could have a significant impact on Washington.

The law, which requires individuals to disclose activities on behalf of foreign interests, has been on the books since the 1930s, but recently it has been enforced in an aggressive manner. It was used in cases against Butina, Paul Manafort, Trump's former campaign chairman, and a former Obama White House official, Greg Craig (he will go on trial in August).

Some say the strict enforcement of the law is an important step towards providing transparency about foreign groups and their influence on policymaking. Yet others say this could go too far and threaten the work of non-governmental organisations and media organisations that receive support from abroad.

However you see it, the crackdown is likely to change the way that lobbying - and policymaking - is done.

What exactly did Butina do?

Authorities say Butina was directed by a senior Russian official to infiltrate conservative political groups, including an unnamed pro-gun lobbying organisation presumed to be the National Rifle Association, which is allied with US President Donald Trump's Republican party.

In her plea agreement, Butina admitted to working with former Russian lawmaker Alexander Torshin to infiltrate the NRA and pursue backdoor channels of communication to American conservatives who could influence US politics.

While doing so, Butina failed to report her activities to US authorities, as required by law.

In a statement read in court, one of the prosecutors said Butina had drafted a document in March 2015 called "Diplomacy Project" that called for unofficial communication lines between high-ranking US officials and Russia.

She acknowledged that she had worked with two Americans and a Russian official.

Image copyright Reuters Image caption Maria Butina has been sentenced after pleading guilty to conspiring to act as a foreign agent

Russian reaction

Mr Putin's remarks on Saturday were in line with previous statements made by the Russian government.

The Russian Foreign Ministry on Friday described the result as a "disgrace for the US judicial system" and accused the court of carrying out a "clear political order."

The Russian embassy in Washington said on its Facebook page that Butina was a "political prisoner" and demanded her immediate release. The post was accompanied by the hashtag "Free Maria Butina."

The Russian government has previously described the case as "fabricated".