An imam who spoke passionately at a funeral service for victims of the Quebec City mosque attack says he's heartened his message of compassion is being widely shared around the world.

​In his speech, Hassan Guillet denounced the "poisoned words" that he said permeate Quebec's political and social discourse about Muslims in the province.

He said the news media and politicians had helped inflame the climate before the shootings, and he warned this won't be the last time such funerals are held.

Among the victims of that discourse was the alleged shooter, 27-year-old Alexandre Bissonnette, he said, adding that peoeple shouldn't seek revenge for the crime. 

Guillet told The Canadian Press he didn't have time to prepare a speech, given his role as a spokesman for the province's council of imams.

"People could see that the man standing in front of them is an honest man, a sincere man and a sad man and is talking his pain. I think it was apparent," Guillet said.

"I was touched."

Speech popular on social media 

The transcript of the speech quickly spread on social media and was most notably shared by Harry Potter author J.K. Rowling, who praised Guillet's "extraordinary and humane words" to her nearly 10 million Twitter followers.

Guillet said he's thankful for Rowling's comments. His daughter called to tell him about it, and he said it has given him a new, younger audience.

"Mainly I was in contact with the older generation, but with what Mrs. Rowling did, she gave me a new audience which is the Harry Potter generation," said Guillet, who came to Canada from Lebanon in 1974 and is now retired from the aerospace industry.

Guillet spoke at the funeral for Ibrahima Barry, 39, Mamadou Tanou Barry, 42, and Azzeddine Soufiane, 57, held in Quebec City Friday.

They were among the six men who died when a shooter entered the mosque where they were attending evening prayers last Sunday. 

A funeral for the other three victims — Khaled Belkacemi, Abdelkrim Hassane and Aboubaker Thabti — was held in Montreal Thursday. 

Bissonnette has been charged with six counts of first-degree murder and five counts of attempted murder following Sunday night's shooting. The allegations against him have not been proven in court.

with files from The Canadian Press