A U.S. Army sergeant's decision to plead guilty on Wednesday to deserting to North Korea in 1965 was part of a plea bargain in a Cold War-era case that effectively settled a dispute between Japan and the United States.

Sgt. Charles Robert Jenkins, 64, appeared before a U.S. military judge and acknowledged abandoning his post in South Korea and crossing the Demilitarized Zone into the North. The North Carolina native, who at one time faced the possibility of life in prison, was sentenced to 30 days in a military jail and a dishonorable discharge, but the judge, Col. Denise Vowell, recommended the jail term be suspended. Jenkins is expected to provide U.S. officials with information about his 38 years in North Korea.

The Japanese government had intervened on behalf of Jenkins, whose wife, Hitomi Soga, is a Japanese citizen who was abducted by North Korean spies in 1978. She was repatriated in late 2002 following diplomatic overtures by Prime Minister Junichiro Koizumi.

Japan had asked U.S. officials to be lenient in the case after winning Jenkins's release from North Korea last July. Jenkins and Soga have two daughters whom the North Koreans also released last summer.

The story of Jenkins and his family has captured much news media attention in Japan, where they are likely to resettle.

"I only hope that the small happiness we have as a family will grow bigger and bigger," Soga told the judge on Wednesday.

Jenkins, who was in uniform, told the court he had planned his desertion over 10 days and tied a white T-shirt to his rifle to signal his surrender to the North Koreans.

He said he feared his hazardous duty assignment on the tense Korean Peninsula and wanted to avoid being redeployed to Vietnam. He said he made his decision after being depressed for many days.

"I walked away from my squad . . . for the purpose of going to North Korea," Jenkins told the court.

Close to tears, Jenkins added "it was Christmastime. It was also cold and dark. I started to drink alcohol. I never had drunk so much alcohol."

Jenkins, who was raised in poverty and did not attend high school, said he had intended to travel to the Soviet Union and turn himself in at the U.S. Embassy there. But the North Koreans did not allow him to leave. "I knew 100 percent what I was doing, but I didn't know the consequences behind it," he said. "I didn't know that North Korea was going to keep me."

Jenkins acknowledged a charge of "aiding the enemy" by teaching English in North Korea during the 1980s. But he denied that his participation in at least one North Korean propaganda movie -- in which he played a sinister CIA agent -- amounted to an additional charge of making disloyal statements against the United States.

Besides participating in propaganda films, Jenkins is also believed to have taught at a North Korean spy school.

Jenkins said he cooperated with the North Korean government because he wanted to protect Soga and their two daughters. He said his relationship with Soga helped him to survive emotionally.

"Our mutual hate for North Korea brought us together and kept us together for 24 years," he said. "Marriage to my wife brought me happiness."

After arriving in Japan via Jakarta in July, Jenkins surrendered to U.S. authorities at Camp Zama. He faced a maximum penalty of life in prison, but prosecutors originally sought a sentence of nine months in jail. Hiroyuki Hosoda, Koizumi's top spokesman, thanked the United States on Wednesday for its "consideration" in the Jenkins case.

U.S. Army Sgt. Charles Robert Jenkins, center, is seen at Camp Zama, a U.S. military base near Tokyo, before pleading guilty to deserting in 1965.