ByEfrem Lukatsky, Associated PressMay 25, 2016

Ukrainian President Petro Poroshenko, Ukrainian servicewoman Nadiya Savchenko, her sister Vera, her mother Maria and her comrades pose for a picture at the Presidential Administration in Kiev, Ukraine, May 25, 2016. Ms. Savchenko was released on Wednesday after almost two years in prison in Russia.

During the nearly two years that she was imprisoned in Russia, Ukrainian pilot Nadezhda Savchenko became a national hero in absentia, lauded for her flinty defiance. On Wednesday she made a celebrated return to the country still embroiled in a fight against Moscow-backed separatists.

Savchenko, who was captured by rebels in June 2014 and then resurfaced in Russian custody, was convicted in March and sentenced to 22 years in prison for complicity in the deaths of two Russian journalists. Prosecutors alleged she was acting as a spotter for mortar fire that killed them.

Savchenko was released after a pardon from President Vladimir Putin, which he said he made on humanitarian grounds at the urging of the journalists' relatives. In turn, Ukraine on Wednesday released two Russians who had been convicted of waging war in eastern Ukraine, where separatists and Ukrainian forces have been fighting since April 2014 in a conflict that has killed more than 9,300 people.

Savchenko's case became a celebrated cause at home. Ukrainians admired her unwavering antagonism toward Russian authorities, whom she denounced in court and insulted by raising her middle finger, and they worried about her health as she called several hunger strikes.

Her case also attracted wide international attention, with Western leaders including President Barack Obama calling for her release.

But if the release of Savchenko warmed Ukrainians' hearts, it could also serve as a reminder of how intractable the eastern conflict may seem. Cease-fire violations have been reported almost daily in recent months and negotiations on implementing other elements of the Minsk cease-fire agreement show only fitful progress.

Savchenko was elected to Ukraine's Parliament while locked up in Russia and a poster with her picture has adorned the rostrum there for months.

That could give her substantial symbolic power if she enters politics full-time. Dissatisfaction with President Petro Poroshenko and the government is strong as the eastern fighting persists and the country wallows in endemic corruption.

If she would stand up and challenge Poroshenko and the government, that could serve Russia's interests by making Ukraine's political stresses even more fraught.

Keeping Savchenko in custody clearly had become a liability for the Kremlin, drawing continued international attention to the conflict which has corroded Russia's image. Although Russia persistently denies military involvement, Western sanctions over the conflict have dealt a blow to Russia's economy.

Putin, however, would have looked weak if he had backtracked on her case and could only release her in a swap once she had been convicted. Once her trial and that of the captured Russians had run their course, Putin and Poroshenko made a deal.

U.S. Secretary of State John Kerry on Wednesday expressed satisfaction with the release of Savchenko andUkraine's decision to release the two Russians.

Savchenko's release "after a long ordeal that included solitary confinement, is an important part of fulfilling Russia's commitments under the Minsk agreements" on calling a cease-fire in the conflict, he said in a statement.

Putin, at a meeting with the journalists' relatives, expressed "hope that such decisions, driven by humanity, will help to alleviate the stand-off in the conflict zone and help to avoid such terrible and pointless losses."

The two Russians, Alexander Alexandrov and Yevgeny Yerofeyev, were also freed on Wednesday, and Russian state television showed them being greeted at a Moscow airport by their wives.

The two were captured last year. They acknowledged being Russian officers, but the Russian Defense Ministry, which has denied sending troops to Ukraine, claimed they had resigned from active duty. They were tried in a Kiev court, which sentenced them to 14 years in prison after finding them guilty of terrorism and waging war in eastern Ukraine.

"Ukrainian experts insist that the Kremlin's willingness to negotiate for them is proof that they were regular Russian troops, part of a large invading force that tore Ukraine apart following the Maidan Revolution in early 2014, even as Moscow denied any direct involvement," The Christian Science Monitor reported in April:

While the standard Ukrainian narrative argues that separatism in the eastern region of Donbass following the Maidan Revolution was entirely Moscow-made, the actual extent of Russian intervention has proven extremely difficult to pin down. And Russian experts argue that the case of Mr. Alexandrov and Mr. Yerofeyev is no smoking gun.

"Of course there is no way that ragtag rebel army could have defeated the Ukrainian forces in those decisive battles around Donetsk in 2014 and early 2015 without Russian help," says Sergei Strokan, international affairs columnist for the Moscow daily Kommersant. "But the Russian side has developed this legal formula, which says that lots of Russian 'volunteers' crossed over to help the rebels, but no regular Russian troops."

"You may say it's a distinction without a difference, but it lets Russian authorities off the hook," says Mr. Strokan. "Arguing over it has already proven to be a dead end."

In Ukraine, meanwhile, Poroshenko sent his plane to pick up Savchenko in Rostov-on-Don in southern Russia and bring her home to Kiev, where she received a hero's welcome.

"Thank you everyone for fighting for me!" she told a scrum of journalists at Kiev's Boryspil Airport. "You fought for everyone behind bars. Politicians would have kept silent if people had been silent. I would like to say thank you to everyone who wished me well: I have survived because of you."

Savchenko, a professional air force officer, was fighting with a Ukrainian volunteer battalion against Russia-backed rebels in eastern Ukraine when she was captured in the summer of 2014. After she surfaced on the other side of the border, Moscow claimed she had escaped from the separatists and was caught in Russia, while she claimed she was abducted and smuggled into Russia.

In giving her a state award on Wednesday, Poroshenko said she had become "a symbol of pride and steadfastness."

Savchenko has skirted questions about her political ambitions and didn't mention it upon arrival on Wednesday, but Yulia Tymoshenko, the former prime minister who leads Savchenko's party told reporters Savchenko wants to start working right now.

"She asked me: 'Where do I need to be, where do I go to start working,'" Tymoshenko said. "A strong leader has come back home, that's for sure."

But Savchenko hinted Wednesday that physical fighting may be more important to her than political battles.

"I would like to apologize that I am still alive. But I'm ready to go and fight for Ukraine today," she said, standing next to Poroshenko.

Nataliya Vasilyeva, Lynn Berry and Jim Heintz in Moscow contributed to this report.