Russia has freed jailed Ukrainian pilot Nadiya Savchenko, who became a symbol of resistance against Moscow.
"I am free," Savchenko told a crowd of reporters and politicians as she arrived in Kiev as part of a prisoner swap with two alleged Russian soldiers.
She was sentenced to 22 years in jail for killing two Russian journalists in eastern Ukraine, charges she denied.
The two Russians - Yevgeny Yerofeyev and Alexander Alexandrov - were earlier flown from Kiev to Moscow.
Savchenko was pardoned by Russian President Vladimir Putin before her return to Ukraine.
Mr Putin said he had acted after meeting relatives of the two Russian journalists, who had asked him to show mercy to Savchenko.
In Ukraine, President Petro Poroshenko pardoned the two Russian nationals.
In a tweet (in Ukrainian) earlier on Wednesday, Mr Poroshenko wrote: "The presidential plane with Hero of Ukraine Nadiya Savchenko has landed!"
Speaking to reporters at Kiev's Boryspil airport, Savchenko was in defiant mood.
"I am ready to once again give my life for Ukraine on the battlefield," she said.
At a joint news conference with President Poroshenko later on Wednesday, Savchenko thanked her family and the people of Ukraine for supporting her while she was held in Russia.
"Ukraine has the right to be, and it will be!" she said, pledging to do everything she could to free all Ukrainian nationals still being kept prisoner in Russia and in parts of Ukraine controlled by pro-Russian rebels.
Meanwhile, President Poroshenko - who awarded Savchenko a Hero of Ukraine star - said: "This is our common victory!"
He also personally thanked German Chancellor Angela Merkel, French President Francois Hollande and US President Barack Obama for supporting Ukraine.
Analysis by the BBC's David Stern in Kiev
Nadiya Savchenko is back on Ukrainian soil, and the first indications are that she will be the same outspoken firebrand that she was during Russian captivity.
Undoubtedly, the Kremlin will remain one of her main targets. But it will be interesting to watch which Ukrainian politicians will become the focus of her ire.
Her politics apparently lean towards the nationalist camp - though how far they extend in this direction remains to be seen.
While in prison she was elected as a parliamentary deputy from Yulia Tymoshenko's Fatherland party. Both Savchenko and Ms Tymoshenko are strong-willed personalities - and conflicts between them might erupt.
But the biggest question is how she and President Petro Poroshenko will get along. Savchenko voiced her support for the Minsk peace agreements, and Mr Poroshenko looked pleased as he stood beside her.
But she also said that "peace is only possible through war". If she decides to turn against the president, the anti-Poroshenko camp will be strengthened by what at the moment is Ukraine's most powerful political voice.
Reacting to Savchenko's release, EU foreign affairs chief Federica Mogherini described it as "long awaited good news, that the EU celebrates with her country", while German Foreign Minister Frank-Walter Steinmeier said it was "good news that we have long worked for".
Savchenko was captured in 2014, as pro-Russian separatists in Ukraine's eastern Donetsk and Luhansk regions battled government forces.
She was charged with directing artillery fire that killed the two journalists, but she says she was kidnapped prior to the attack and handed over the border to the Russian authorities.
Her time in jail saw her mount a hunger strike and she was even elected in absentia to Ukraine's parliament and the Parliamentary Assembly of the Council of Europe.
'Jaws of Mordor'
The two pardoned Russian nationals flew to Moscow's Vnukovo airport on a specially chartered plane.
They were met by their wives, as well as media representatives.
Ukraine said the pair were elite members of Russian military intelligence - but Russia insisted they were not on active duty when they were captured in eastern Ukraine.
They were sentenced to 14 years in jail last month after being found guilty of waging an "aggressive war" against Ukraine, committing a terrorist act and using weapons to provoke an armed conflict.
Ukraine and the West had repeatedly called for Savchenko's release and a prisoner swap was long been considered likely.
"It's been a long and complicated road," said Nikolai Polozov, one of her lawyers.
"But we have been able to prove that there are no insurmountable tasks and we've managed to free the hostage from the jaws of Mordor," he added, referring to the cruel land in the Lord of the Rings saga.
Savchenko's capture contributed to the deterioration in Russia-Ukraine relations since 2014.
Moscow annexed the Crimea peninsula in March 2014 after an unrecognised referendum on self-determination, and is accused of sending weapons and its regular troops to support the separatist rebels in eastern Ukraine.
Moscow denies this, but admits that Russian "volunteers" are fighting with the rebels.