A Russian court has convicted the former director of Moscow's Ukrainian Literature Library of inciting hatred in a ruling that Amnesty International said displayed "utter contempt for the rule of law."

In a June 5 verdict that followed a closely watched trial, the Meshchansky District Court also found Natalya Sharina guilty of embezzlement and handed her a four-year suspended sentence.

The hate-crime charge against the 59-year-old librarian stemmed from the Russian state's claim that her library's collection included books that are banned in Russia as extremist, including works by Ukrainian ultranationalist Dmytro Korchynskiy. Police have have been accused of planting some of the banned books at the state-run library.

The case was steeped in the confrontation between Russia and Ukraine, whose historically close ties have been torn apart by Moscow's seizure of Crimea and support for separatists in eastern Ukraine.

Sharina was detained in October 2015 amid growing animus between Moscow and Kyiv over Russia's illegal annexation of the Black Sea peninsula and its involvement in the war in eastern Ukraine, which has killed more than 9,900 people.

In April 2016, investigators additionally charged her with embezzlement, claiming that she used library funds to pay for her legal defense in a separate extremism case against her that was dismissed in 2013.

Her lawyer said the authorities had "trumped up" the new charges after realizing their initial case against Sharina was too weak.

Sharina, who was under pretrial house arrest for most of the time after she was detained, has rejected all the allegations as politically motivated. The respected Russian human rights group Memorial considered her a political prisoner.

"This highly politicized case runs totally counter to justice and highlights serious flaws in the independence of Russia’s judiciary. Natalya Sharina should not have been prosecuted, still less convicted," Denis Krivosheev, deputy director for Europe and Central Asia at Amnesty International, said following the verdict.

"The prosecution has exploited the highly charged anti-Ukrainian atmosphere that is prevalent in Russia at the moment, while the court simply dismissed key evidence for the defense, including testimonies that police officers were seen planting the banned books at the library," an Amnesty statement quoted him as saying.

On May 29, the state prosecutor asked the judge to find Sharina guilty and give her a five-year suspended sentence.

With reporting by RFE/RL's Russian Service, Rapsinews, TASS, and Interfax