Ukraine had said that the mayor was kidnapped last Friday by Russian forces.
Ukraine handed over nine captured Russian soldiers to secure the freedom of the mayor of the city of Melitopol, who was detained last week, the Interfax Ukraine news agency quoted a senior official as saying on Wednesday.
The office of President Volodymyr Zelenskiy earlier said mayor Ivan Fedorov had been released but gave no details.
"Ivan Fedorov was released from Russian captivity ... for him, Russia received nine captured soldiers who were born in 2002 and 2003. These are actually children," Interfax Ukraine quoted Zelenskiy press aide Darya Zarivnaya as saying.
Ukraine had said Fedorov was kidnapped last Friday by Russian forces.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)