The United States on Wednesday secured the return of an Army soldier who crossed the heavily armed border into North Korea from South Korea more than two months ago, senior White House officials said.

The confirmation came hours after North Korea announced it had expelled the soldier, Travis King, based on the country's law after he admitted to "illegally" entering its territory.

U.S. State Department spokesman Matthew Miller said King has already departed from Osan Air Base in South Korea to return home after being transferred through China with the help of Sweden, which has long served as the protecting power for the United States in North Korea.

A TV screen shows U.S. Army serviceman Travis King appearing on a news program from Seoul Station in Seoul, South Korea, on Aug. 16, 2023. (AP/Kyodo)

A senior U.S. official said King "appears to be in good health and good spirits."

Miller told a press briefing that the 23-year-old soldier was received by the U.S. ambassador to China, Nicholas Burns, at Dandong, a Chinese city on the border with North Korea, and was flown to the air base via Shenyang.

The soldier, a private second class in the U.S. Army, dashed into North Korea without authorization on July 18 after he was on a civilian tour to the Joint Security Area in the Demilitarized Zone dividing the two Koreas.

U.S. President Joe Biden's top national security aide Jake Sullivan issued a statement thanking China for its assistance in facilitating the transit of King and Sweden for its diplomatic role.

The senior officials said they heard earlier this month from Sweden that North Korea wanted to release King.

Since then, the officials said, multiple government agencies have been working intensely to secure his safe return home.

They said the Biden administration will first focus on King's health after his return, leaving questions about his administrative status, including whether he will be punished, to be handled later.

The North's official Korean Central News Agency said King confessed that he had "illegally intruded" into its territory as he "harbored ill feeling against inhuman maltreatment and racial discrimination" within the army.

KCNA said King, who is black, was also "disillusioned about the unequal U.S. society," citing North Korea's concluded probe into his case.

The expulsion came amid long-running tensions between the United States and North Korea, which do not have diplomatic relations, and no signs of resuming talks over Pyongyang's nuclear and missile programs.

North Korea has a track record of detaining foreigners to use as bargaining chips in disputes with the United States and other countries.

Compared with past cases, North Korea's decision to release King -- who became the first U.S. national known to be detained in the reclusive country in about five years -- came relatively quickly.

One of the senior officials, who spoke on condition of anonymity, stressed that no concessions were given by the United States to North Korea to secure his release, adding that Washington "remains very open to the possibility of diplomacy" with Pyongyang.

A day before crossing the border, King, who was convicted of assault in South Korea, was supposed to board a commercial flight to Texas after being released from a detention facility and was due to face disciplinary action by the U.S. military.

He was escorted by the military to Incheon International Airport near Seoul on July 17 but later left the facility by himself and joined the tour of the inter-Korean truce village of Panmunjeom.

Related coverage:

North Korea says U.S. soldier who crossed border is seeking refuge

U.S. soldier crosses inter-Korean border into N. Korea