NIAGARA-ON-THE-LAKE, Ont. -- The premiers of Quebec and Ontario say helping identify radicalized young people and reintegrating them back into the community cannot be left only to police and security services.

Premier Philippe Couillard says he called the leaders of Quebec's Muslim community to thank them for their quick condemnation of this week's deadly attacks against soldiers in Ottawa and Saint-Jean-Sur-Richelieu, Que.

Couillard says authorities have to engage the communities so young people that become disillusioned with life don't find a solution in violence or radicalization.

He says the way to do this is through social workers and through mosques, for example, but not through the police.

Ontario Premier Kathleen Wynne says she agrees that community organizations need to be directly involved in helping deal with the problem of radicalized youth.

Wynne says it's an issue for the broader community -- not just a single ethnic group -- and she promises the province will work with social agencies as well as security services to help deal with young people who may pose a threat.

"There isn't one solution to this," she said. "This is all of us figuring out how young people are falling through the cracks or are getting onto a path that makes them dangerous to everyone else."

Couillard began a speech to the Ontario Economic Summit in Niagara-on-the-Lake Friday by praising Canada's security forces.

"I want to say again our gratitude towards our security forces, our men and women in the armed forces," he said. "I think we should honour their memory and recognize what they are doing, facing this threat that Canada and the rest of the world is facing now."