Nadiya Savchenko smiles during a verdict hearing in Russia on March 21, 2016.Maxim Shemetov / Reuters

Ukraine and Russia have neared a deal to free a Ukrainian air-force pilot was captured by Russian-backed rebels in eastern Ukraine in 2014 and sentenced last month to prison in Russia.

Ukrainian President Petro Poroshenko said Tuesday the two nations had “agreed on a certain algorithm” for the release of Nadiya Savchenko, the AP reported. Her release could come as part of a swap, Poroshenko said, for two Russian officers who were sentenced Monday in Kiev to 14 years in prison on charges of terrorism in eastern Ukraine. Poroshenko said in a tweet Tuesday he had spoken with Savchenko by phone, and urged her to end the hunger strike she began in early March. Her lawyer told the AP the pilot has agreed to start accepting food.

Savchenko was captured during a clash between Ukrainian government forces and separatists in Luhansk in June 2014. She was found found guilty last month in the deaths of two Russian journalists, who were killed by artillery fire, and sentenced to 22 years in prison. Ukraine and Western governments said the Russian charges against her were fabricated, and her defense said cellphone data from that day indicated Savchenko was detained at least an hour before the journalists were killed. Russia says Savchenko escaped from pro-Moscow Ukrainian separatists and was caught inside Russia’s borders.

Savchenko, the first woman to graduate from the Ukraine’s Air Force University in 2009,  has become a Ukrainian national hero following her capture and conviction.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.