U.S. first lady Jill Biden met with Ukrainian refugees in eastern Slovakia on Sunday, the last day of her tour of Romania and Slovakia to visit U.S. servicemen deployed there and women and children who fled Russia's invasion of Ukraine.

Biden spoke to refugee families, volunteers and local authority workers at a refugee centre in the eastern Slovak city of Kosice, one of the main transit points for over 400,000 Ukrainian refugees who have crossed the border to Slovakia since the Russian invasion started on Feb. 24.

The United Nations says 5.8 million people in total have fled Ukraine since Russia started what it casts as "special military operation" in Ukraine.

"When the war started we understood that nowhere in Ukraine is safe," Viktoria Kutocha, a teacher who fled from the western Ukrainian city of Uzhhorod with her 7-year old daughter, told Biden.

Biden, the wife of U.S. President Joe Biden, asked Kutocha how she explained the war to children.

"It's very difficult to explain. I only said there is a war and I cannot explain because I do not know myself," Kutocha said.

"It's senseless," Biden responded, before embracing the mother and her child.

Biden, who teaches English and writing at a community college in Virginia, also visited a local school attended by refugee children.

"The hearts of the American people are with the mothers of Ukraine," she said, wishing the women at the school a happy Mother's Day.

One woman there said she felt children needed to have the war explained to them.

"They need to understand why we are here and why we receive help - why are we separated from our husbands. They need to understand what is going on," she said.

Biden was due to visit Vysne Nemecke, the main border crossing on Slovakia's 98 km (61 miles) border with Ukraine later on Sunday.

Biden, who spent the first two of her four-day tour in Romania, departs from the region on Monday.

Most of the refugees who crossed into Slovakia have travelled onward to other countries, but over 74,000 have received temporary protection status in the country of 5.5 million.

(Reporting by Jan Lopatka Editing by Raissa Kasolowsky)