An Australian student who was detained in North Korea has been released and safely left the country, traveling to China where he told reporters on Thursday he was well.

Alek Sigley, 29, who was studying in the North Korean capital, Pyongyang, had been missing since June 25.

“I’m OK. I’m good, I’m very good,” Sigley told reporters at Beijing airport.

He declined to comment about what happened to him in the North Korean capital of Pyongyang where he had been living. He made a peace sign as he walked through the airport.

An Australian government source familiar with the situation said Sigley was due to travel to Tokyo from Beijing. Sigley is married to a Japanese woman, Yuka Morinaga.

Prime Minister Scott Morrison interrupted Parliament earlier on Thursday to confirm that Sigley had been freed.

Morrison later said in a statement that Swedish authorities had helped secure the student’s release.

“This outcome demonstrates the value of the discreet, behind the scenes work of officials in resolving complex and sensitive consular cases, in close partnership with other governments,” Morrison said in the statement.

He did not say why Sigley had been detained.

Australia has no diplomatic presence in North Korea and relies on other countries such as Sweden to act on its behalf.

Sigley’s father, a professor of Asian studies in the western Australian city of Perth, told reporters his son would soon be reunited with his wife.

“We are extremely pleased that Alek is safe and sound in Beijing,” Gary Sigley said.

He said his son was in good spirits and in the care of Australia’s embassy in Beijing.

Sigley was an active social media user when he lived in North Korea and regularly posted photos and blog posts about subjects such as food and fashion.

Alarm was first raised that he was missing when he disappeared from his social media accounts.

He was also a regular contributor to international media about life in North Korea, which he was invariably enthusiastic about.

The treatment of foreigners, most usually from the United States, by the secretive North has long been a contentious issue. Some have been held as prisoner for years on accusations of spying.

The death of American student Otto Warmbier in 2017 after he was detained in North Korea for 17 months sparked a long period of tension between the United States and North Korea.

He had been sentenced to 15 years of hard labour in 2016 for, according to North Korean state media, trying to steal an item bearing a political slogan.

Warmbier died shortly after he was flown home to Ohio in a coma after being held by North Korea for 17 months.