North Korea has released an NYU student who was was arrested for entering the country illegally back in April.

North Korean state media says Won Moon Joo, 21, was deported as a humanitarian measure.

Joo is a citizen of South Korea and has permanent residency status in the United States.

The North says Joo admitted breaking the law when he entered through China.

South Korea says it plans to investigate whether he broke the country's security law, which prohibits unapproved travel to the North. 

It's still not clear why Joo entered North Korea.