An American soldier who defected to North Korea in 1965 and spent four decades as a prisoner died on Monday in Japan, Reuters reported. He was 77.

Pyongyang released Charles Jenkins in 2004, after which he moved to Japan and settled with his family. He was one of the four American soldiers who defected to North Korea in the 1960s, but he was the only one to be released.

One night in January 1965, Jenkins, then 24, abandoned his unit while patrolling near the demilitarised zone between the two Koreas. He later said he fled to avoid getting killed during patrols or being sent to fight in the Vietnam War. He expected to get asylum with the Russian Embassy in North Korea and then return to the United States through a prisoner swap.

However, Jenkins’ plan failed. He was held as a prisoner after he surrendered to North Korea.

While in custody, he taught English to soldiers and played the role of an evil American spy in a North Korean propaganda film. He also met Hitomi Soga, a Japanese prisoner, who he later married.

Soga was released in 2002 and Jenkins two years later, with their two daughters. He wrote a book about his experiences in North Korea.

“Thinking back now, I was a fool,” Jenkins told CBS in a 2005 interview. “If there’s a God in the heaven, he carried me through it.”