MONTREAL -- The RCMP says a Quebec man has been charged in connection to alleged online threats made against Prime Minister Justin Trudeau and the Muslim community.

Andre Audet, 62, appeared at a courthouse in Longueuil, Que., on Jan. 9 in connection with two charges -- public incitement of hatred and wilful promotion of hatred.

Charges filed at the courthouse say both alleged crimes occurred between Jan. 1 and Oct. 22, 2019 -- the day after last year's federal election.

The RCMP says in an emailed statement that the investigation was carried out by its Integrated National Security Enforcement Team.

Given a rise in online threats, the RCMP says it has focused resources on online surveillance and investigators are now better able to identify and deal with threats made on the web.

Spokesperson Cpl. Melanie Cappiello-Stebenne says in an email that the force takes all threats seriously and violent comments are not tolerated.

"Individuals who write such comments are liable to severe penalties," Cappiello-Stebenne wrote. "Although the individuals being investigated may not have been in direct contact with the persons or groups they targeted, their comments are just as worrisome and could lead to acts of violence."

According to court filings, Audet, of Boucherville, Que., had been given a summons to appear in court on Dec. 19.

The Prime Minister's Office declined to comment on the charges.

"We never comment on matters relating to the prime minister's security," said spokesperson Elanore Catenaro in an email.

Audet returns to court on Mar. 24.

This report by The Canadian Press was first published Jan. 17, 2020.