Hassan al-Kontar speaks to reporters at an airport in Vancouver, B.C., after flying from Kuala Lumpur International Airport, where he was stranded for seven months. (Ben Nelms/Canadian Press/AP)

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 he posted on Twitter, inspiring comparisons to Tom Hanks’s 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 be 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 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.

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 to 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.

In June, he posted a screenshot of an email 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 the Islamic State 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.

Kontar’s video diaries received international attention, and thousands of people began following his near-daily updates. Among them was Laurie Cooper, a complete stranger living in Whistler, B.C., 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 $13,600 required for citizens to privately sponsor a refugee for resettlement, the Guardian reported. Then they waited to see whether 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 received 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, 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 Corp. “I’d rather use a horse if there’s no car.”