Ukrainian pilot Nadiya Savchenko has been freed by Russia, her lawyer said Wednesday.

Story highlights

NEW: Savchenko pardoned by Russian President, Kremlin says

She became a symbol of Ukrainian resistance against Russia

CNN  — 

Nadiya Savchenko, the Ukrainian military pilot who became a national hero in her homeland during two years of detention by Russia, was released Wednesday.

Russian President Vladimir Putin pardoned Savchenko prior to her release, according to a statement on the Kremlin website. She was released as part of a prisoner exchange with Ukraine, the Russian state-run Tass news agency reported.

Two Russians arrested by Ukraine and accused of being Russian soldiers were sent home as part of the exchange, Tass said.

Savchenko arrived in Kiev by plane Wednesday afternoon, emerging barefoot in blue jeans and a t-shirt with the Ukrainian trident on it, the Kiev Post and other media reported.

She told a crowd of reporters gathered to greet her that she was grateful for her supporters and ready to give up her life for Ukraine.

Savchenko’s lawyer, Mark Feygin, had earlier announced her release on Twitter.

“Two years ago I made a promise to the Ukrainian people that I would make every effort to free Nadiya,” Feygin wrote. “So look. I know how to keep my word. She is coming home to Ukraine.”

Russia claimed the 35-year-old was responsible the deaths of two Russian journalists hit by mortar fire at a checkpoint in eastern Ukraine and sentenced her to 22 years in prison in a trial denounced by Human Rights Watch as “unsound” and “highly politicized.”

Savchenko denied the allegations. She went on a hunger strike last year to protest her detention, telling CNN in a letter that she had already been in Russian captivity for an hour when the journalists died.

“I have not seen them, and our ways have never crossed. The ‘rebels’ themselves told me that those journalists came under fire of their own ‘makhnovtsi’ [slang for ‘anarchists’],” Savchenko wrote.

Savchenko’s detention helped transform her into a Ukrainian symbol of resistance against Russia, which has been accused of supporting separatists in the Russian-leaning eastern Ukraine and even sending troops of its own to fight the government in Kiev.

Ukrainian President Petro Poroshenko awarded her the title “Hero of Ukraine,” one of the nation’s highest honors. She was even voted into the Ukrainian parliament during her detention.

Ukraine: Everything you need to know about how we got here

CNN’s Victoria Butenko, Sebastian Shukla and translator Oleg Pasichnyi contributed to this report.