Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A Syrian man who spent nearly seven months stranded at an airport in Malaysia's capital has been removed and detained.

Hassan al Kontar, 36, had been living at Kuala Lumpur international airport since March 7. He refused to return to his war-torn homeland amid fears he would be arrested for evading military service.

The U.N. refugee agency confirmed his arrest to NBC News on Tuesday.

It was not immediately clear why al Kontar had been detained or where he was being kept.

But on Monday, he posted images from his childhood on Twitter.

In hard times, you will descover that what you become during the process is more important than the aim it self.



You knew it was hard but you did it hard.



My life journey in photos ... pic.twitter.com/Pbnm9NX9Ve — Hassan Al Kontar (@Kontar81) October 1, 2018

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

“I am really tired," al Kontar told NBC News in an interview in May. "I keep shouting that I am not a bad guy, I am not a coward — I can fight, but it’s not my fight. It’s someone else’s fight in my land."

Before Syria's civil war broke out in 2011, al Kontar was living what would be considered a normal life and worked as an insurance marketing manager in the United Arab Emirates.

Hassan al Kontar Hassan Al Kontar

He was later summoned for military service. After refusing to return, he says the Syrian embassy in the UAE declined to renew his passport in 2012. That meant his work permit couldn’t be renewed, so al Kontar lost his job and remained in the UAE for the next six years.

Al Kontar was apprehended by UAE authorities last year. He was eventually sent to Malaysia — one of the few countries to accept Syrian citizens without a visa for up to 90 days.

After his attempts to obtain a permanent visa there failed, he decided to go to Ecuador, another country that accepts Syrians without a visa. But the airline refused to let him fly at the last minute.

He later tried to travel to Cambodia, but was sent back to the airport in Kuala Lumpur in early March. He had been stranded at the airport in the Malaysian capital until Monday.

Al Kontar survived on airline meals given to him by staff members and slept on a mattress on the floor.

Charlie Yaxley, a spokesman for the UNHCR, said al Kontar has been arrested Monday night.

"We are currently following up with Malaysian authorities, and have reiterated to them the need to respect relevant international laws," Yaxley added, particularly the principle of forcibly returning a refugee or asylumseeker to their country of origin.

Al Kontar's Canadian-based lawyer Andrew Brouwer told NBC News Tuesday that he was assessing the situation.

Malaysian airport and immigration authorities did not immediately respond to a request for comment.

In April, al Kontar applied for asylum in Canada but a group of volunteers helping with his case said the application process could take up to 23 months.