MONTREAL -- The man charged after a major Montreal synagogue was defaced with swastikas was found not criminally responsible on Friday.

On Jan. 13, Adam Riga, 28, was arrested after spray-painted swastikas were found on the doors of Westmount’s Congregation Shaar Hashomayim.

Riga faced two charges: possession of incendiary materials and for threatening to burn the synagogue down.

On Friday, Justice Claude Leblond decided Riga would be detained at the Albert-Provost mental health hospital following a psychological assessment by the Philippe Pinel Institute.

The defence recognized Riga did commit the acts for which he was accused, but psychiatrists determined he couldn’t form a criminal intent because he was mentally unfit.

He will be detained at Albert-Provost until it is determined that he’s no longer a danger to society.

The January incident brought outcry from Montreal’s Jewish community members and top lawmakers alike.

At the time, Adam Scheier, the synagogue's rabbi, told CTV News the situation could’ve been much worse.

Scheier said he reviewed security footage which showed Riga "putting the can of gasoline down and [taking] out the spray paint. That was the first thing he did and thankfully the last thing."

The synagogues security guard intercepted Riga, detaining him on the scene until police arrived.

According to Scheier, “clergy of all different faiths” offered their support and best wishes to the congregation following the attack.

-- With files from CTV Videojournalist Stephane Giroux