A man has been arrested by Quebec City police for allegedly making hateful comments about Muslims online.

Nicolas Thériault, 46, was arrested Friday and appeared in court Saturday to face charges of inciting hate and uttering threats.

Quebec City police (SPVQ) said they were informed about the comments, which appeared on a social media site, by the RCMP.

"In that message, there were incitements of hatred against the Muslim community," SPVQ spokesperson Mélissa Cliche told CBC News.

An investigation allowed them to identify a suspect.

Cliche would not say if the suspect was part of a larger group, or if the social media messages were posted to a forum or sent in a private message.

She said that people need to be aware that they are responsible for the messages they send online.

Quebec City police arrest man accused of online Muslim threats0:35

"It's OK to exchange ideas on social media, but there really is a limit to respect so that it doesn't become criminal," Cliche said.

Thériault was released on $500 bail and under numerous conditions, including staying more than 500 metres away from all Quebec mosques and not being allowed to own weapons or use a computer.

Jan. 29 will mark the first anniversary of the deadly mosque shooting in Quebec City which killed six people and wounded 19.