WASHINGTON (AP) — Russia and the United States have carried out an unexpected prisoner exchange in a time of high tensions, trading a Marine veteran jailed by Moscow for a convicted Russian drug trafficker serving a long prison sentence in America.

The deal announced by both countries involving Trevor Reed, an American imprisoned for nearly three years, would have been a notable diplomatic maneuver even in times of peace. It was all the more surprising because it was done as Russia’s war with Ukraine has driven relations with the U.S. to their lowest point in decades.

The U.S., for its part, returned Konstantin Yaroshenko, a Russian pilot who’d been serving a 20-year federal prison sentence in Connecticut for conspiracy to smuggle cocaine into the U.S. after he was arrested in Liberia in 2010 and extradited to the U.S. The Justice Department has described him as “an experienced international drug trafficker” who conspired to distribute thousands of kilograms of cocaine around the world.

Despite Reed’s release, other Americans remain jailed in Russia, including WNBA star Brittney Griner and Michigan corporate security executive Paul Whelan.

The exchange took place in Turkey, Reed’s father, Joey Reed, told CNN.

“The American plane pulled up next to the Russian plane and they walked both prisoners across at the same time, like you see in the movies,” he said.

The swap seemed unlikely to herald any larger breakthrough between Washington and Moscow. A senior Biden administration official cautioned that the negotiations centered on a “discrete set of prisoner issues” and did not represent a change to the U.S. government’s condemnation of Russia’s violence against Ukraine.

“Where we can have discussions on issues of mutual interest we will try to talk to the Russians and have a constructive conversation without any way changing our approach to the appalling violence in Ukraine,” the official told reporters, speaking on condition of anonymity under ground rules set by the administration.

President Joe Biden, who met in Washington with Reed’s parents last month, trumpeted Reed’s release and noted without elaboration that “the negotiations that allowed us to bring Trevor home required difficult decisions that I do not take lightly.” The Russian foreign ministry described the exchange as the “result of a long negotiation process.”

Reed, a 30-year-old former Marine from Texas, was arrested in the summer of 2019 after Russian authorities said he assaulted an officer while being driven by police to a police station following a night of heavy drinking. He was later sentenced to nine years in prison, though his family maintained his innocence and the U.S. government described him as unjustly detained and expressed concern about his declining health.

A lawyer for Yaroshenko, who last year sought a reduced prison sentence because of Yaroshenko’s vulnerability to COVID-19, did not immediately return an email seeking comment Wednesday.

Russia had sought Yaroshenko’s return for years while also rejecting entreaties by high-level U.S. officials to release Reed, who was approaching his 1,000th day in custody and whose health had recently been worsening, according to his family.

A senior U.S. official, who was not authorized to discuss the matter by name and spoke to The Associated Press on the condition of anonymity, described Reed’s case as one of “utmost priority” for the Biden administration. His family said Reed’s poor health included symptoms of tuberculosis.

“It was a difficult decision but one that we thought was worth it,” the official said.

Though officials would not say where the transfer took place, in the hours before it happened commercial flight trackers identified a plane belonging to Russia’s federal security service as flying to Ankara, Turkey. The U.S. Bureau of Prisons also updated its website overnight to reflect that Yaroshenko was no longer in custody.

Reed was en route back to the U.S., traveling with Roger Cartsens, the U.S. government’s special presidential envoy for hostage affairs.

“Today, our prayers have been answered and Trevor is on his way back safely to the United States,” Reed’s family said in a statement.

The prisoner swap was the most prominent release during the Biden administration of an American deemed wrongly detained abroad and came even as families of detainees who have met over the last year with administration officials had described the officials as cool to the idea of an exchange.

The U.S. government does not typically embrace such exchanges for fear that it might encourage foreign governments to take additional Americans as prisoners as a way to extract concessions and to avoid a potential false equivalency between an unjustly detained American — which U.S. officials believe Reed was — and a properly convicted criminal.

In this case, though, the U.S. decided the deal made sense in part because Yaroshenko had already served a long portion of his prison sentence, which has now been commuted.

The Reed family thanked Biden “for making the decision to bring Trevor home” as well as other administration officials and Bill Richardson, the former U.S. ambassador to the United Nations, who the family said traveled to Moscow in the hours before the Ukraine war began in hopes of securing Reed’s release.

The Reed family had also been working with a consultant, Jonathan Franks, who has been involved in other high-profile releases, such as the case of Michael White, a Navy veteran freed from Iran in 2020.

Reed’s release had no immediate impact on the cases of other Americans held by Russia. Griner, for one, was detained in February after Russian authorities said a search of her bag revealed a cannabis derivative. Whelan is being held on espionage-related charges his family says are bogus.

U.S. officials have described Whelan as unjustly detained, and Biden said Wednesday “we won’t stop until Paul Whelan and others join Trevor in the loving arms of family and friends.”

Reed’s parents demonstrated outside the White House last month in hopes of getting a meeting with the president.

“We believe that that meeting with the president is what made it happen” Joey Reed told CNN. “Which is what we had said all along — if we could just speak to the president, he’s that kind of person.”

When he is reunited with his son, the father said, “I want to hug him and not let him go.”