For seven months, Hassan al-Kontar was trapped in air-conditioned purgatory. Stranded in Terminal 2 at Kuala Lumpur International Airport, he slept under stairwells and lived off leftover chicken-and-rice dinners from AirAsia flights. He documented his daily life in video diaries that he posted on Twitter, inspiring comparisons to Tom Hanks' character in 2004′s The Terminal.

Kontar, 37, left his home in Syria for the United Arab Emirates in 2006 to avoid being conscripted into mandatory military service. Then in 2011, civil war broke out and the Syrian government refused to renew his passport. Kontar feared that if he returned to Syria, he would be forced to join the military or thrown in jail. "I'm not a killing machine and I don't want any part in destroying Syria," he told the BBC. "I don't want blood on my hands."

When his passport expired, Kontar's work permit, too, became invalid. After working under the table for several years, he was arrested and told to leave the country. He flew to Malaysia, one of the few countries where Syrians have a chance of getting a visa. He was granted a three-month tourist visa and immediately began working to save up money for a ticket to Ecuador. But when he showed up for his flight to South America in February, he was turned away at the gate for reasons that remain unclear.

Kontar flew to Cambodia instead, but wasn't granted permission to enter the country. Finally, he returned to Malaysia, only to be told that he couldn't enter the country because he had overstayed his visa. Out of money and out of options, he made the terminal his home.

READ MORE:

* Asylum-seeking Zimbabwean family stranded at Bangkok airport

* Turkey illegally sending Syrians back to war zone

* Frustration at speed of repairs to Kuala Lumpur's 'sinking' terminal

Days turned into weeks, then months. Flights left for Honolulu, Australia, the Maldives, Myanmar. Embracing the absurdity of his situation, Kontar posted pictures of himself tending his garden - a single potted plant - and walking a stuffed animal on a leash. Although he was rapidly losing weight, he stayed in shape by using the moving walkways as a treadmill. He attempted to trim his unruly black hair with a pair of safety scissors in the bathroom, with minimal success.

BEN NELMS/AP For seven months, Hassan al-Kontar was trapped in Kuala Lumpur International Airport.

In June, he posted a screenshot of an email that he had sent to Nasa, asking if he could join the next mission to Mars. "Its very clear by now that there is no place for me on this earth as no country is allowing me in," he wrote, adding that he had seen "a lot of space movies".

As the summer dragged on, Kontar fluctuated between lightheartedness and despair. In one tweet posted in late July, he lamented a massacre carried out by ISIS and complained that world leaders were violating his human rights by not granting him asylum. His next post came four days later and showed him perched on top of a baggage cart and dancing to Drake's In My Feelings as part of the viral Keke Challenge.

Unable to escape the monotony of Terminal 2, Kontar derived joy from small pleasures, like a gift of Starbucks instant coffee. One Sunday, a janitor briefly propped open a door leading out to the tarmac. For the first time in 122 days, Kontar could breathe fresh air from the outside world. "This is what I call a great day." he wrote on Twitter, posting a photograph of the sunlight-flooded hallway.

BEN NELMS/AP Hassan Al Kontar meets supporters after landing in Vancouver, Canada.

​Kontar's video diaries got international attention, and thousands of people began following his near-daily updates. Among them was Laurie Cooper, a complete stranger living in Whistler, British Columbia, who, along with a group of friends, petitioned Canada's immigration minister to admit Kontar as a refugee. Through a crowdfunding campaign, they raised the US$13,600 required for citizens to privately sponsor a refugee for resettlement, the Guardian reported. Then they waited to see if his application would be approved.

But at the beginning of October, Kontar's updates abruptly stopped. Malaysian officials said that he had been arrested for being in a restricted area of the airport without a boarding pass. Panic set in among Kontar's sponsors, who urged Canadian officials to speed up the resettlement process, fearing that he would be deported to Syria.

Finally, on Sunday, Cooper got a text message from Kontar: He was on his way. The next morning, a new video appeared at the top of his Twitter feed for the first time in months. Once again, Kontar was at the airport. This time, though, he had a destination.

Arriving in Vancouver late Monday night (local time), Kontar made one thing clear: he was done with airports for good.

"I've done my time in airports, no more airports," he said, according to the Canadian Broadcasting Corporation. "I'd rather use a horse if there's no car."