North Korean state-run media reported Saturday that a 29-year-old Australian student who left the country this week had been detained for spying and was expelled after apologizing.

The dispatch by the Korean Central News Agency marks the first confirmation to the outside world by the government that Alek Sigley was detained.

According to the report, Sigley, who was studying at Kim Il Sung University in Pyongyang, was "caught red-handed committing anti-DPRK incitement through internet" on June 25. DPRK is the acronym for the North's formal name, the Democratic People's Republic of Korea.

A subsequent investigation revealed that Sigley used his status as a student to pass "data and photos he collected and analyzed while combing Pyongyang" to "anti-DPRK media" entities, KCNA said.

Sigley "honestly admitted his spying acts" and asked for forgiveness, it said, adding that the government expelled him "by showing humanitarian leniency."

Sigley flew out of Pyongyang on Thursday accompanied by Sweden's special envoy to the country and later in the day arrived in Tokyo to join his Japanese wife.

On Friday, he issued a statement saying he was safe and well and thanking the Swedish and Australian governments for their help. He did not touch on the reasons for his detainment.

Sigley was reported missing by friends last week after a period of unusual online silence.

Related coverage:

Australian citizen detained in North Korea freed: prime minister