MOSCOW — Ukraine swapped dozens of prisoners on Sunday with Russian-backed separatists in the country’s east, the latest sign of a tenuous thaw in relations between Ukraine and Russia.

The trade was seen as a success for President Volodymyr Zelensky of Ukraine, who has vowed to free all detainees and negotiate a settlement to the conflict in eastern Ukraine. But it came at a high price: to secure its prisoners, Ukraine freed riot police officers who had been accused of shooting protesters during the country’s revolution in 2014, a widely criticized move.

Mr. Zelensky negotiated the swap with President Vladimir V. Putin of Russia this month at peace talks in Paris that otherwise made little headway in resolving the five-year war.

The sides exchanged soldiers, activists and people accused of espionage, some of whom had been languishing in jails for years.