In a 7-0 ruling Thursday, the high court upheld a 2009 decision by Peter Van Loan, then the public safety minister, to reject the man's application on the grounds he was inadmissible in the national interest.
Muhsen Ahmed Ramadan Agraira came to Canada on a false Italian passport in 1997 and originally claimed refugee status because he was a member of the Libyan National Salvation Front — a group that opposed dictator Moammar Gadhafi.
His claim was rejected in 1998 because his application was not deemed credible and was against Canada's national security interests.
Agraira married a Canadian woman in 1999, who sponsored him for permanent residency.
Agraira's lawyer, Lorne Waldman, called the court's ruling and the government's position ironic, given that Canadian warplanes were part of the NATO-led coalition that helped groups such as the LNSF in toppling Gadhafi in 2011.
"When Gadhafi was overthrown this organization was involved in the coalition and Canada used military force to support the overthrow of Gadhafi," Waldman said.
"Where is logic in deporting my client for being involved in an organization that we supported militarily and politically?"
The Supreme Court offered Agraira one remaining option to stay in Canada — to reapply under humanitarian and compassionate grounds.
"Having concluded that the minister's implied interpretation of the term 'national interest' is reasonable, I should also confirm that the decision as a whole is valid," Justice Louis LeBel wrote on behalf of the court.
"The minister's reasons were justifiable, transparent and intelligible."
LeBel said that the minister took into account Agraira's "contradictory and inconsistent accounts of his involvement with the LNSF, a group that has engaged in terrorism."
Agraira later said he exaggerated his involvement with the group in order to bolster his refugee claim.
While the Supreme Court ruling did give Agraira one last hope to stay in Canada, it was not immediately clear whether that option remains available.
That's because Bill C-43, the Faster Removal of Foreign Criminals Act, received royal assent and became law on Wednesday — the night before his ruling.
The new law gives the immigration minister more power to decide who should stay in Canada.
Waldman said there's enough room in Thursday's ruling to justify making another application so his client can remain in Canada. He said he plans to talk to Agraira in the coming days.
Agraira has not received a deportation notice, he added.
The high court did chide Van Loan for the "inordinate delay in rendering a decision that was of the utmost importance to Mr. Agraira" and decided not to order the government's costs be covered for the case.
Agraira was initially successful in appealing the government's original decision. In December 2009, Federal Court Justice Richard Mosley overturned Van Loan's decision.
Mosley concluded that Van Loan had not balanced the factors in prior Federal Court decisions on determining what is in Canada's national interest.
Mosley granted the application for judicial review, but the government took the case to the Federal Court of Appeal.
The appeal court reversed that decision and sided with Van Loan.
Justice Denis Pelletier pointed to Agraira's own statement in a June 2009 affidavit when he tried to renounce his earlier declaration that he was a member of the LNSF.
Agraira said when he arrived in Canada, he was told that claiming membership in the group would help his refugee claim.
"I was ill-advised," he said.