A US soldier who fled to North Korea last year will plead guilty to desertion at a court martial as part of a plea deal, his lawyer said.

Private Second Class Travis King ran across the border from South Korea into the North in July last year while on a sightseeing tour of the Demilitarized Zone that divides the Korean Peninsula.

North Korea expelled King in September and the US Army later charged him with desertion and a raft of other crimes.

King’s lawyer Frank Rosenblatt said Monday the US Army had charged the soldier with 14 offenses and that he would plead guilty to five of them.

“He will plead guilty to five of those, including desertion, 3 counts of disobeying an officer, and assault on a noncommissioned officer,” Rosenblatt said in a statement.

“He will plead not guilty to the remaining offenses, which the Army will withdraw and dismiss.”

King’s guilty plea and sentencing hearing would take place on September 20 at a court martial in Fort Bliss, Texas, the lawyer said.

“There, he will explain what he did, answer a military judge’s questions about why he is pleading guilty, and be sentenced,” Rosenblatt said.

Desertion carries a jail sentence of up to five years.

“Travis is grateful to his friends and family who have supported him, and to all those outside of his circle who did not pre-judge his case based on the initial allegations,” his lawyer said.

At the time of the incident, King had been stationed in South Korea and after a drunken bar fight and a stay in South Korean jail, he was meant to fly back to Texas to face disciplinary hearings.

Instead of traveling to Fort Bliss, he walked out of the Seoul-area airport, joined a DMZ sightseeing trip and slipped over the fortified border where he was detained by the communist North’s authorities.

Pyongyang had said that King had defected to North Korea to escape “mistreatment and racial discrimination in the US Army.”

But after completing its investigation, North Korea “decided to expel” King in September for illegally intruding into its territory.

King’s border crossing occurred with relations between the two Koreas at a low point, with diplomacy stalled and North Korean leader Kim Jong Un calling for increased weapons development, including tactical nuclear warheads.