OTTAWA -- A former imam whose sermon at the funeral of worshippers murdered at a Quebec City mosque attracted international attention will run for the federal Liberals in a Montreal riding.

Hassan Guillet won a contested nomination in Saint-Leonard-Saint-Michel, becoming the first Liberal candidate not to come from the influential Italian community since the 1988 inception of the east-end riding.

Guillet says he wants to represent everyone in the riding and not just its substantial North African community. He beat a local city councillor and a notary to secure the nomination.

The engineer said he hopes to be a "bridge builder" at a time when Quebecers and Canadians are more divided than ever on issues of immigration and secularism

"When I arrived in Quebec 45 years ago, we were talking about two solitudes," Guillet, who is originally from Lebanon, told The Canadian Press. "Now we talk about a multitude of solitudes."

Guillet rose to prominence for a sermon he gave at the 2017 funeral for three of the six victims of the Quebec City attack.

At that time, he referred to the killer, Alexandre Bissonnette, as a victim -- which earned him worldwide praise. J.K. Rowling, the author of the Harry Potter books, called his words "extraordinary and humane."

Two years removed from the 2017 mass slaying, Guillet said he finds the social climate is still quite tense as the Legault government pushes ahead with a secularism bill restricting the wearing of religious symbols.

Guillet was the first candidate to declare his intention to run after Liberal MP Nicola Di Iorio announced last year he would no run for a second mandate.

Guillet promised at the time to give up his role as a volunteer, part-time imam, and that will remain the case as he seeks office. He said he has no time to be an imam now.

The one exception came during Bissonnette's sentencing in February, when the local community insisted he speak as a reassuring voice.

Mr. Guillet, who speaks six languages, delivered his victory speech in French, English, Italian and Arabic. He added some Creole words too for good measure.

The Conservative candidate in the riding is Ilario Maiolo, a lawyer and part-time-professor at the University of Ottawa.