MOSCOW — A Russian court on Monday sentenced a former director of the Library of Ukrainian Literature in Moscow to a four-year suspended prison term for inciting hatred toward Russians and embezzling public funds, in a case that her lawyers described as an attack on cultural figures with ties to Ukraine.

The court ruled that Natalia G. Sharina purchased anti-Russian books and other materials and put them on the library’s shelves to help Ukrainian nationalists get a foothold in Moscow.

Her lawyers said that they would appeal the sentence in Russian courts and also seek redress in the European Court of Human Rights.

During the trial last week, Mrs. Sharina — who has been under house arrest since October 2015 — said she lacked any motive or intent to influence people’s views.