Prime Minister Justin Trudeau says his federal Liberal government will work closely with municipalities to deal with the effects of extreme weather and climate change — even if Ottawa and the provinces in question aren't getting along.

In a speech in Quebec City today to members of the Canadian Federation of Municipalities, Trudeau specifically cited Doug Ford, accusing his Ontario Conservative government of blocking federal funding for local projects.

Trudeau says the Ontario premier is playing politics with communities, with citizens paying the price.

The prime minister says his preferred option is the type of co-operative federalism that Canadians expect: three levels of government working together whatever their political stripes.

But if provinces don't want to play ball, Trudeau says his government will find a way to get funding to municipalities.

He says extreme weather events like flooding, forest fires and droughts are rapidly becoming the norm, exacerbating a housing crisis that's being felt across the country.

He says his government has a plan to deal with climate change and that politicians of all stripes mustn't close their eyes to what is happening around them.