The worst moments of bringing Trevor Reed home turned out to be the best.

With U.S.-Russian relations at their lowest point in decades, it seems impossible to hope for the release of Reid, a former Marine who has been detained in Russia for nearly three years. This week, however, the Biden administration completed the type of deal it had previously seemed to resist, replacing Reed with the Russian pilot and convicted drug dealer Konstantin Yaroshenko, who is serving 20 years in the United States.

A series of events and considerations over the past two months helped bring about the swap, including escalating concerns about Reid’s health, his parents’ private Oval Office meeting with President Joe Biden, and a former Diplomats secretly visit Moscow and Ukraine on the cusp of the Russian war.

“All three have forced the White House to make decisions that they haven’t made before,” said Mitch Bergman, vice president of the Richardson Center for Global Engagement.

How the war — and the breakdown in U.S.-Russian relations — affected the deal is unclear. U.S. officials emphasized that negotiations to release Reid were narrow, focused directly on the prisoners rather than the war in Russia, and did not reflect any broader diplomatic engagement. But while the timing of the deal is astounding, its foundations were laid before the conflict began.

“I did it,” Biden told reporters on Wednesday about the deal. “I brought it up. I brought it up three months ago.”

Just as the war was about to begin, Bergman and his colleague, former U.S. ambassador to the United Nations and former New Mexico governor Bill Richardson, flew FedEx CEO Fred Smith to Moscow to meet with the Russian government officials. It is a continuation of their negotiations to free Reed and another jailed US corporate security executive, Paul Whelan.

They left the outlines for the one-on-one exchange that eventually occurred.

In Texas, Joy and Paula Reid worry that Russia’s war with Ukraine and the resulting tensions with the U.S. could close lines of communication and prevent any negotiating common ground. In meetings with government officials last year — including with the Justice Department, which is prosecuting Yaroshenko — the couple expressed support for the exchange, but said they were not led to think it was a viable option.

“They didn’t say: ‘Oh, we agree with you, that’s good. That’s a good point,'” Paula Reed told The Associated Press in February. “They didn’t say anything like that. They just said: ‘We heard. Thank you so much.'”

But weeks into the war, the couple did something that caught the attention of the White House.

As Biden traveled to Texas to support veterans, the Reeds stood on the convoy route, hoping for a meaningful face-to-face interaction with the president. That didn’t happen, although he did get on the phone with the couple. Later that month, they arrived in Washington, where they stood on placards near the White House, hoping to meet with the president again.

Joey and Paula Reed pose for a photo with their son, Marine Corps veteran and Russian prisoner Trevor Reed at their home in Fort Worth, Texas [File: LM Otero/AP Photo]

This time, they were invited to the Oval Office to sit down with Biden and other administration officials. The White House issued a statement that night reaffirming its commitment to bring Reid and Whelan home, a question raised by senior officials during private meetings with Russian leaders.

The meeting was a rare opportunity for a presidential visit for the family of a U.S. detainee, especially since Biden himself has been less public about his efforts to bring Americans home than his predecessor, Donald Trump. Behind the scenes, however, Biden and Secretary of State Anthony Blinken are bringing the cases to the Russians, and Roger Carstens, the presidential envoy for hostage affairs, is also working on the issue.

In March, Reed told his parents that he coughed up blood several times a day, had lung pains and fractured ribs. Last year, he contracted COVID-19. Even on Wednesday, his parents were taken aback by how skinny their son looked in the transfer video. They said they expected he would need medical attention before returning to daily life in Texas.

Reid’s ill health “has contributed to the conversation on this issue, to the point where we can make this arrangement, to the point where we can move to some of the logistics of simply getting it done,” a senior administration said. Officials told reporters at a background briefing this week.

Separately, a lawyer for Yaroshenko said his client suffers from multiple health problems and tried to get him released early from a 20-year prison sentence in 2020 on compassionate grounds due to the pandemic, but failed to success.