A Syrian man who spent seven months stranded in an airport in Malaysia after he refused to return to his home country because he feared being arrested for refusing to join their military has been granted asylum and permanent residency in Canada.

Hassan al Kontar, 37, arrived in Vancouver around midnight on Monday, his lawyer Andrew Brouwer confirmed to NBC News. He had been living at Kuala Lumpur International Airport since March 7.

Before al Kontar was allowed to enter Canada, he was at risk of being deported to Syria. Brouwer credits "lots of advocacy and behind the scenes work" in helping to expedite al Kontar's asylum application, which typically takes up to 26 months to process.

Brouwer said the Canadian government contacted Malaysia to assure al Kontar that his application would be expedited.

“We are completely relieved by the outcome," Brouwer said. "What happened to Hassan is emblematic of what it’s like to be a refugee. He is one of the millions upon millions of refugees out there — people stuck in limbo like he was. It is very important for Hassan that people realize that.”

In a tweet Monday, al Kontar announced that he had traveled to an international airport in Taiwan and was headed to his "final destination" in Vancouver.

"The last 10 months, it was very hard," he said in a video posted on Twitter. "I could not do it without the support and prayers from all of you. I could not do it without the help of my family, my Canadian friend's family, and my lawyer. Thank you all. I love you all. I will keep you updated."

Breaking news ✌✌ pic.twitter.com/o2vQGROBdS — Hassan Al Kontar (@Kontar81) November 26, 2018

He added: "Let's keep the prayer for those who still need it the most, in refugee camps and detention camps all over the world. I hope they will be safe and legal as soon as possible, too."

The British Columbia Muslim Association and the Canada Caring Society sponsored al Kontar to come to Canada as a refugee.

"It was a unique and very difficult situation. We are really grateful to the Minister of Immigration, Refugees and Citizenship and to the Canadian officials who worked so hard to resolve Hassan’s predicament," Canada Caring Society volunteer Laurie Cooper said in a statement. "We are proud that Canada was willing to step up and help Hassan when so many countries around the world are closing their doors to refugees.”

A request for comment by the Minister of Immigration was not immediately returned.

Al Kontar’s struggles to find a safe place to live began when he refused to join the military in Syria. Al Kontar, who was working as an insurance marketing manager in the United Arab Emirates at the time, said the Syrian embassy in the UAE declined to renew his passport in 2012, which meant his work permit could also not be renewed.

He spent the next several years in the UAE.

Hassan Al Kontar, left, and Laurie Cooper share a light moment after Al Kontar arrives at an airport in Vancouver, British Columbia, after flying from Kuala Lumpur Nov. 26, 2018. Al Kontar, a Syrian man who was stranded for seven months at the Kuala Lumpur International Airport, arrived in Vancouver on Monday night. Ben Nelms / The Canadian Press via AP

Last year, al Kontar was apprehended by UAE authorities and sent to Malaysia, which accepts Syrian citizens without a visa for up to 90 days. After his visitor visa expired in March, al Kontar decided he would travel to Ecuador to request asylum, but he was not allowed to board the plane.

Al Kontar was also not allowed to re-enter Malaysia because he had overstayed his visa. With nowhere to go, al Kontar found himself stuck at Kuala Lumpur International Airport. In early October, he was detained by Malaysian authorities and was taken to an immigration detention center in Kuala Lumpur, according to his lawyer.

Al Kontar gained international attention after he started tweeting about his plight. His tweets caught the attention of Canada Caring Society volunteer Laurie Cooper, who helped him apply for asylum in April.

At least I know that I tried 💇‍♂️💇‍♂️..I could not do it 🤷‍♂️🤦‍♂️.. it's ok I like long Curly hair anyway 😍#syrian_stuck_at_airport #mystory_hassan pic.twitter.com/yeyBodJR59 — Hassan Al Kontar (@Kontar81) August 21, 2018

Winter is coming & it looks like winter will be here before I leave this airport, Maesters says it will be the hardest in 1000 years so I need to make myself ready.

Do you know if they require visa for north of the wall ??😏😏#syrian_stuck_at_airport #mystory_hassan pic.twitter.com/7b8fnD62dV — Hassan Al Kontar (@Kontar81) August 12, 2018

Just another day at work like any other normal person outside 😀... Welcome to my office ladies and gentlemen🤓.

Just making some plans for the weekend 🕺🎳🍸⛷⚽️🎱#syrian_stuck_at_airport #mystory_hassan pic.twitter.com/8HsIEWbe8Z — Hassan Al Kontar (@Kontar81) August 3, 2018

CORRECTION: (Nov. 27, 2018, 3:01 p.m. ET) An earlier version of this article misstated how long Hassan al Kontar spent in the Kuala Lumpur International Airport. He was in the airport for seven months, not eight.