Australia's government warned a student not to return to North Korea, a day after he was released from detention by Pyongyang under mysterious circumstances.

Alek Sigley, who flew to Tokyo yesterday to join his Japanese wife, had been studying in the North Korean capital and had been missing since 25 June.

"My advice would be pretty clear, I would stay in Japan. I would go back to South Korea ... I would come back to Australia," Home Affairs Minister Peter Dutton told the Nine network.

"All of those would have to be better options before he returns to North Korea," Mr Dutton said.

"I don't think he will put himself back in that situation ... it could have ended up very differently."

Mr Sigley left North Korea yesterday and flew to Beijing, where he was met by Australian officials for the flight to Tokyo.

He declined to comment to a throng of reporters at Haneda Airport, only making a peace sign before being taken away.

It is still not clear why he was detained and the details of his release were also not known.

Swedish authorities helped secure Mr Sigley's release because Australia has no diplomatic presence in North Korea and relies on other countries to act on its behalf.

The Swedish diplomat who helped secure Mr Sigley's release, Kent Harstedt, said he could not divulge details of the detention.

"The only thing I can say is that we welcome that North Korea was prepared to listen to our arguments and that this could be resolved so quickly - I think this is good for all parties concerned," said Mr Harstedt, who was pictured with Mr Sigley at Beijing airport.

Sweden increased its engagement with North Korea in 2017 at the height of tensions between Pyongyang and Washington.

Donald Trump became the first incumbent US president to set foot in North Korea when he met its leader, Kim Jong-un, in the region's demilitarised zone on Sunday in an attempt to resume stalled nuclear talks.