JOINT BASE ANDREWS, Md.—Wall Street Journal reporter Evan Gershkovich stepped back onto U.S. soil to a hero’s welcome from President Biden and Vice President Kamala Harris late Thursday, capping a lengthy wrongful detainment and conviction in Russia that culminated in the most complex prisoner swap between Western allies and Russia since the Cold War.

Gershkovich, who was jailed in 2023 and convicted in July of espionage charges that he, the Journal and the U.S. government vehemently denied, emerged from a government aircraft that landed at a suburban Washington military base at 11:37 p.m. in a small silver Bombardier jet with a red stripe and the window blinds drawn.

Gershkovich, the second to walk off the jet, held his arms wide to hug Harris as Biden spoke with the family of another released prisoner, the former Marine Paul Whelan , who walked off first. Whelan saluted Biden and said, “How you doing, Sir?’’

Arriving on a muggy summer night, Gershkovich and the others landed at Joint Base Andrews after a roughly 10-hour flight they boarded in Ankara, Turkey, following the massive prisoner swap earlier Thursday.

In addition to the president, vice president, other officials and throngs of media, Gershkovich was greeted by his immediate family: his father, Mikhail; his mother, Ella Milman; his sister, Danielle, and his brother-in-law, Anthony Huczek. Gershkovich first greeted his mother, hugging her and lifting her off the ground. He was also greeted by some of his colleagues, including the Journal’s editor in chief, Emma Tucker , who took the reins of the Journal just weeks before Gershkovich’s detention. “Thank you for everything, Emma, that was a lot,” Gershkovich said, smiling. “I gave you a surprise in your first few weeks.”

Speaking to reporters, Biden thanked the allies who he said made the “toughest call” in the exchange, especially Germany and Slovenia. He added that the two countries made decisions against their “immediate self-interest” to make the deal happen—and expressed an optimistic message to the nation.

“There is nothing beyond our capacity if we act together—nothing, nothing, nothing,” Biden said. “We’re the United States of America.”

The former prisoners and their families are expected to board a separate plane bound for Brooke Army Medical Center near San Antonio, where Gershkovich and the other two prisoners who arrived with him will be evaluated medically and psychologically and begin the reintegration process on U.S. soil. It is the same facility to which Brittney Griner was taken after she was released from Russian captivity in December 2022.

The Gershkovich family had earlier Thursday joined Biden in the State Dining Room of the White House where the president formally announced the deal to get Gershkovich and others out of Russia. Gershkovich was joined on the flight by Whelan, a former U.S. Marine and corporate security executive from Michigan who had been jailed since 2018, and Alsu Kurmasheva, a Radio Free Europe/Radio Liberty journalist and a dual U.S.-Russian citizen who was convicted in July. All three had vehemently rejected the Russian charges.

Whelan, when asked about what he would tell those still detained in Russia, said, “Just hang in there. We’re coming for you.’’

Russia had detained Gershkovich, 32 years old, in Russia’s notorious Lefortovo prison for more than a year on a false allegation of espionage. Russia’s judicial system sentenced him in a secretive three-day trial to 16 years in a high-security penal colony. The prisoner exchange, the largest since the Cold War, included the exchange of 24 prisoners and at least six countries in a deal officials in the U.S., Russia and Germany had worked on for months. Ultimately, the deal hinged on the release of a German prisoner: Russian hit man Vadim Krasikov, who emerged as a linchpin to the exchange. Russia released 16 prisoners in all.

Write to Ken Thomas at ken.thomas@wsj.com and Gordon Lubold at gordon.lubold@wsj.com