MINNEAPOLIS (AP) — An American held in the United Arab Emirates for nine months for his role in an online parody video about youth culture in Dubai said Friday that he was scared at times and was kept in filthy conditions where guards “shouted at everyone like dogs.”

In a wide-ranging interview with The Associated Press, Shezanne Cassim said the lowest point of his ordeal came when he learned he was being transferred to a maximum-security prison in Abu Dhabi — and the gravity of his situation set in.

READ MORE: Art Tribute To Bob Dylan Goes Up Outside Hibbing High School

“At that moment, I felt fear,” he said. “It no longer … felt like it was something ridiculous that could be just sorted out. At that point it was like, ‘Is this really happening?'”

Friday’s interview marked the first time Cassim, 29, has publicly shared his account of some details about his confinement.

Cassim was living and working in Dubai when he was arrested last April — months after posting his satirical video online. He was moved to the Abu Dhabi prison in June, and was eventually charged with endangering state security under a 2012 cybercrimes law that tightened penalties for challenging authorities.

He and seven others were convicted and sentenced. Cassim was released earlier this month and returned to his family in Minnesota. Cassim’s attorney, Susan Burns, said all the co-defendants who were detained have now been released.

Cassim, who grew up in Dubai, said he and his friends made the video to celebrate the city’s diverse culture and create some local entertainment. The video, titled “Ultimate Combat System: The Deadly Satwa Gs,” pokes fun at a segment of Dubai youth and shows fictional “combat” training, such as using a mobile phone to call for help.

“When I made the video, I didn’t think I was doing anything wrong,” he said.

The video had been online for about six months, when suddenly the number of views spiked, and Cassim got called to the police station.

Cassim was questioned for about an hour, as police asked: “Who has paid you to make this video? How much are they paying you? Who is behind this?” he recalled.

“Naturally I was quite shocked at hearing these kinds of questions,” he said. “But you know, we tried to convey the message, ‘Look it’s just a joke. We’re not part of anything.'”

He said he was shuffled overnight from room to room and told to sign a statement, which he didn’t understand because it was in Arabic. He took a polygraph test and passed, despite a slight panic when asked whether he was part of a foreign anti-government organization.

He thought he would be allowed to leave. Instead handcuffs came out.

READ MORE: Nathan Hase Killed In Goodhue County Crash

“I didn’t know I was under arrest or that there was any crime,” he said. “I thought that this was so ridiculous that it’s going to get sorted out in a couple of days.”

Cassim said he stayed for about two months in the Dubai jail, where guards “shouted at everyone like dogs” and conducted room searches in full riot gear. The food was abysmal, and for a time Cassim ate just enough bread to keep himself going.

He said the conditions were unsanitary. Blankets were shared without being washed, and 130 people had to use a communal bathroom.

“The smell was horrendous,” he said, adding that he thought the toilets were made of clay until one detainee cleaned them — only to find they were metal and had been covered with caked-on feces. When the communal sink was cleaned with bleach, he said, black maggots crawled out from the tile.

Cassim said outside the jail, where detainees were listed alongside their alleged crimes, the entry next to his name said “under investigation.”

When he was transferred to the prison, his movements became more controlled. He said he had no access to television, newspapers or books, and phone calls were restricted to three times a week.

The prison’s air conditioning stopped working in the middle of the summer, and for a couple months, temperatures inside reached 90 degrees, he said.

Still, he and his co-defendants kept each other going, and week after week, he kept believing he’d be released. But repeated court hearings, and repeated postponements with no action, were like “psychological torture,” he said.

Cassim said it’s great to be home, and he thanked those who worked on his release. After having his life upended, he is spending time with his family and trying to sort out what he’ll do next.

When asked if he was considering legal action, Cassim said that everything is on the table. He may write a book, he said, or look for ways to help the UAE improve its justice system — especially after Sheik Mohammed bin Rashid Al Maktoum, the ruler of Dubai and the prime minister of the UAE, told BBC this week that the way Cassim was treated was unsatisfactory, and the UAE would work to fix mistakes.

“I agree with him to a limited extent … but it was more than a mistake,” Cassim said. “I feel betrayed by the government. … To be honest, I still don’t entirely know what the crime was.”

MORE NEWS: Cameron Clark Will Serve More Than 15 Years For Attempted Murder Of Unborn Child, Aiding And Abetting Robbery

(© Copyright 2014 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)