The 13 soldiers had famously defied Russian warships at the very start of the invasion.
Ukrainian border guards -- who were captured while defending Snake Island -- have now been freed in a prisoner exchange, according to Kyiv.
Ukraine's parliament reported on Thursday that 19 individuals were released in exchange for Russian sailors.
"The first exchange of war hostages occurred on President [Volodymyr] Zelenskyy's order," the parliament said on Twitter.
"Additionally ... Ukraine exchanged 11 Russian sailors we rescued from a sunken ship near Odesa [for] 19 Ukrainian sailors," it added.
Those exchanged included those who generated international attention by defiantly refusing Russian calls to surrender, the parliament stated.
According to viral audio clips, the border guards were told by Moscow forces to "lay down their weapons and surrender to avoid bloodshed and needless casualties" or "be bombed".
The Ukrainian soldiers could then be heard speaking amongst themselves, before swearing at the Russian warship.
Ukrainian officials had initially reported that all troops stationed on the strategic Snake Island (also known as Zmiinyi Island) in the Black Sea had been killed.
But Ukraine's Navy later said that the 13 border guards were, in fact, alive and had been captured by "Russian occupiers". Russia had denied allegations that the Ukrainian soldiers had been killed by air and sea strikes.
Ukraine's Navy also said that members of a humanitarian mission sent to Snake Island had also been captured and had demanded their "immediate release".
Ukraine's border guard agency had said earlier on Thursday that officials were working to free the soldiers who had been on Snake Island.
"Our sailors will return home from the rescue ship "Sapphire," which was captured by the Russian occupiers while trying to withdraw Ukrainian troops from the Zmiiny island," the Ukrainian parliament said.
"Under the exchange terms, the lifeboat will also be returned to Ukraine and sent to a Turkish port," it added.
Russia and Ukraine also exchanged 10 other prisoners of war each on Thursday, in what Ukraine's Deputy Prime Minister Iryna Vereshchuk described as the "first full exchange of prisoners of the military".
"They are all safe and getting all the help they need," Vereshchuk told an earlier press conference.
Learn more about