North Korea has returned a New York University student and South Korean national who had been detained in Pyongyang since April.

21-year-old Joo Won-moon was in North Korean custody after he crossed the border from China into North Korea, hoping to help strengthen ties between the two Koreas.

"I thought some great event could happen and hopefully that event could have a good effect in the relationship between the North and the South," Joo told CNN in an interview in May.

He was dropped off in the border village of Panmunjom at 5:30 p.m. local time Monday, according to South Korea's Unification Ministry. Upon his return, the South Korean government says it will investigate Joo for violation of the South's national security law.

Joo said in North Korean televised press conferences that he hiked and crawled through two barbed wire fences to get into the rogue dictatorship, after which he was arrested by North Korean soldiers.

"I've been fed well, and I've slept well and I've been very healthy," he told CNN.

Joo, who has permanent residency in the United States, is the fourth known South Korean national to be held by the North. Two other South Koreans arrested in December 2014 are being held on charges of spying, charges which Seoul calls "groundless."

Copyright 2016 NPR. To see more, visit http://www.npr.org/.