Australian Alek Sigley, who went missing in North Korea, is "released and safe", Australian Prime Minister Scott Morrison says.
It comes after a meeting between officials from the Swedish embassy in Pyongyang and the North Korean government.
Australia does not have its own embassy in the North Korean capital.
Mr Sigley was pursuing a master's degree and running a tourism business in Pyongyang.
"Alek is safe and well," Mr Morrison said.
"We were advised that the [Democratic People's Republic of Korea] have released him from detention and he has safely left the country and I can confirm that he has arrived safely.
"On behalf of the Australian government, I would like to extend my deepest gratitude to the Swedish authorities for their invaluable assistance in securing Alek's prompt release, which demonstrates the value of discreet behind-the-scenes work by officials in solving sensitive consular cases in close partnership with other governments.
"I'm sure we all could not be more pleased."
It is not known why Mr Sigley, a fluent Korean speaker, had been detained.
Foreign Affairs Minister Marise Payne said Swedish diplomats met with North Korean officials on Australia's behalf on Wednesday to discuss Mr Sigley's disappearance.
She said Mr Sigley's father had been informed about his son's release.
"He is enormously relieved and grateful and … the family has asked that we convey the thanks to everyone who has helped and expressed support for them over the past several days," Ms Payne told the Senate.
"On behalf of the Australian government may I express our deepest gratitude to Swedish authorities for their prompt and invaluable assistance in securing Alek's prompt release."
Ms Payne said she would not be releasing any more information about the case out of respect for Mr Sigley's privacy.
Mr Sigley was reported missing by friends last week.
The 29-year-old, who was believed to be the only Australian living in North Korea, began studying for a master's degree in Korean literature at Kim Il-sung University in Pyongyang last year.
He is the founder of Tongil Tours, an Australian-based company specialising in guided tours to North Korea since 2013.
In 2017 he told the ABC North Korea was "a fascinating country, there's no other country in the world like North Korea" and said it was not dangerous to travel there.
"If we thought it was unsafe, we'd stop doing these tours," he said at the time.
Mr Sigley grew up in Perth but attended the Australian National University in Canberra before moving overseas.
ABC / BBC