Image copyright AP

In April 2014, American Matthew Miller travelled to North Korea as a tourist. He damaged his visa on the flight and attempted to claim asylum - and he has now told a specialist website covering North Korea that he did his best to get arrested. Why?

There is a ritual to be gone through when North Korea imprisons the citizens of the United States. They are, after all, behind bars in one of the most despotic countries on the planet where the methods of punishment, as described by a UN inquiry, include "extermination, murder, enslavement, torture, imprisonment, rape, forced abortions and other sexual violence".

Every US president would move heaven and earth to get the captive freed. Personal envoys get sent - including, in the past, Jimmy Carter and Bill Clinton.

But what if the American captive wants to be there? Matthew Miller who was freed on 8 November is proving to be an intriguing case of the man who chose to defect - though he later changed his mind. He sought imprisonment even when the North Koreans wanted to put him straight on a plane to send him home.

I think it was mistake but it was successful Matthew Miller

NK News, a respected website which interviewed Miller over several days by email, paints a picture of a "curious tourist" who went on an extreme holiday. He told the website he wanted to find out what North Korea was like beyond the tourist trail. He said he "just wanted to have a face-to-face with North Koreans to answer my personal questions".

He didn't explain how getting arrested would help him meet North Koreans.

"My main fear was that they would not arrest me when I arrived," he said. As well as damaging his visa, he also produced a set of confused and confusing notes. "I wrote the notebook in China just before going to North Korea," Miller told NK News. The notes said, among other things, that he was a "hacker" intent on "removing the American military from South Korea".

Image copyright AP Image caption Fellow American Kenneth Bae was also released, having been held in N Korea since 2012

"Perhaps the notebook was a little too much over the top, they instantly knew it was false and wanted to know my true purpose of visiting." In the interview, Miller also said he told officials he possessed military secrets, and that the North Koreans knew his brother was an F-35 test pilot for the US Air Force but didn't seem to care.

When the North Koreans agreed not to deport him, he was held not in some Stalinist gulag but at a big hotel, and then in a guest house - admittedly, under lock and key - where a number of other people including fellow American Kenneth Bae were also living. It was only after he was sentenced in September to six years' hard labour that he was transferred to a more conventional prison facility - "kind of a farm place" as he put it, to NK News.

Shortly after the sentencing, a Reuters report revealed that Miller - aged 25, and originally from Bakersfield, California - had an obsession with Alice in Wonderland, the great work of Lewis Carroll, and had spent two years in South Korea. He had an alter ego - Preston Somerset - a name he used when he commissioned art works illustrating scenes from Carroll's book.

"He recruited a gaming programmer to produce music for him, artists to draw men dressed as Cheshire Cats, and a ghostwriter to help piece the whole thing, named 'Alice in Red', together, according to posts on the deviantArt website," Reuters reported.

Miller cited steampunk, a genre of science fiction, as a favourite of his. As well as Lewis Carroll, he also admired George Orwell and Oscar Wilde.

So Miller was immersed in a fantastic underworld, but it's more Mad Hatter's Tea Party than James Bond.

Most Americans who get arrested in North Korea are missionaries who weigh up the risks of spreading Christian belief in an aggressively atheistic state and who get caught - for example Robert Park, who entered North Korea illicitly in December 2009, and was released two months later, protesting he would rather be martyred. He says he was tortured, and continues to suffer serious mental trauma to this day.

North Korea's policy on visitors

Image copyright Getty Images

Most of the country's tourism comes from neighbouring China

Most travel operators say visas are granted freely to any Westerner who is not a journalist

Tourists' visits very strictly regulated

In 2013, officials loosened some curbs by allowing visitors to bring their mobile phones into North Korea, but mobile phone calls between foreigners and locals are prohibited

There has also been at least one case of an American blundering into the country. According to North Korea Travel, which documents arrests of foreigners in the hermit state, Korean-­American Evan Hunziker swam across the Yalu river from China in 1996 for a bet and was found drunk and naked by North Korean famers. He was released after his family paid the authorities $5,000 (£3,200).

Miller seems to be in a class of his own.

I do feel guilt for the crime - it was a crime Matthew Miller

He told NK News that he repented his escapade, which came to an end after he appealed for help and the head of the US national intelligence services, James Clapper, arrived in the country to intercede.

"I do feel guilt for the crime. It was a crime. I wasted a lot of time of the North Koreans and the Americans," he said.

On the other hand, he said, he spent five months having conversations "with various people" and did achieve his goal of seeing more of North Korea.

"I think it was a mistake, but it was successful."

It was, in a way, a trip to Wonderland - though not the kind most travellers would want.

More from the Magazine

Image copyright KCNA Image caption North Koreans visit Kumsusan Palace, where Kim Il-sung and Kim Jong-Il are both enshrined

North Korea is a difficult place for journalists to visit, but tourists are welcome so long as they do what they are told. In 2013, Juliet Rix found an organised tour allowed her a glimpse of daily life under the secretive regime.

Subscribe to the BBC News Magazine's email newsletter to get articles sent to your inbox.