A Montreal man who was facing charges of inciting hatred online against Jews has been found not criminally responsible due to mental illness but will have to abide by a lengthy list of conditions that include staying off social media.

Robert Gosselin's case came to an end Friday at the Montreal courthouse after a psychiatric evaluation found the 56-year-old could not be held responsible for the crimes.

Gosselin was charged with two counts of uttering threats and one count of inciting hatred in relation to posts on the Facebook page of the Journal de Montreal newspaper. Among the messages was one that threatened to "eliminate Jews by killing an entire school of Jewish girls."

He was out on bail following his arrest last October but was under strict conditions that included staying away from Jewish schools and synagogues.

Those conditions will be maintained among others, prosecutor Diane Mulinda said in a phone interview.

The anti-Semitic threats were made just days before the Oct. 27 attack on a synagogue in Pittsburgh last year, which raised anxiety levels in the Montreal community.