Nejib Belhaj-Chtioui was detained upon his arrival from Tunisia at Montreal's Pierre Elliott Trudeau airport in early December and had been seeking his release pending further developments in the case.
But Quebec court Judge Patrick Healy ruled Wednesday that Belhaj-Chtioui, 36, must remain behind bars.
He faces two charges in connection with the terrorism hoax section of the Criminal Code — conveying information and committing an act to cause reasonable concern that it is connected to a terrorist activity.
Belhaj-Chtioui has pleaded not guilty.
Because of the nature of the charges, the burden of proof was reversed and it was up to the accused to prove he should be released.
Healy ruled that Belhaj-Chtioui poses a flight risk and could be deemed a threat to public safety and national security. He added that his release would undermine the public's confidence in the justice system.
"Even if the burden was not reversed, I would have concluded that the prosecution has amply demonstrated that the guarantees offered by the defence do not respond adequately to the three criteria," Healy wrote.
Authorities say the charges against Belhaj-Chtioui are related to something he posted online a few years ago, but have declined to be more specific.
A hearing was held over a few days in December and earlier this week, when Belhaj-Chtioui testified on his own behalf.
Details from the hearing are covered by a publication ban.
In arguing against his release, prosecutor Lucie Martineau said public safety had to be guaranteed. She described the case as one of the first in Quebec where the reverse burden of proof has been used in a terror hoax charge.
Nicolas Welt, Belhaj-Chtioui's legal-aid lawyer, said he'll sit down with his client and discuss their next move.
"We will always take time to establish a good strategy," Welt said. "Especially in such a serious situation and in such a serious context, we will not rush things.
"There's a difference between participating in a terrorist action and the allegations that are in this case, which is a hoax to make someone believe in a terrorist threat, which is completely different."
The case returns to court Jan. 28 for a date-setting.
Follow (at) sidhartha_b on Twitter.