Updated

Canadian Prime Minister Justin Trudeau sparked anger in the oil-rich province of Alberta on Friday for saying Canada needs to phase out the oil sands.

Trudeau told a town-hall meeting in Peterborough, Ontario that they can't shut down the oil sands tomorrow but they need to phase it out eventually.

The prime minister was asked about his government's approval of pipelines and whether that was consistent with the promise to reduce greenhouse gas emissions. He said there needs to be a transition off dependence on fossil fuels.

Trudeau's comments caused outrage on social media and criticism from Alberta politicians. Premier Rachel Notley said the oil sands are not going anywhere any time soon.

Alberta opposition leader Brian Jean said the oil and gas industry provides thousands of good-paying jobs and if Trudeau wants to shut it down he'll have to go through him and four million Albertans first.

Alberta has the third-largest oil reserves in the world.

Jason Kenney, a former federal Conservative minister and leadership candidate for Alberta's provincial Conservative party, said the oil sands represent trillions of dollars of future wealth for Canadian families.

"That's our ability to pay for pensions, health care, and infrastructure and education. It also represents hundreds of thousands of good paying jobs for working, middle-income families," Kenney said.

Kenney said Alberta won't let Trudeau do to Alberta what Trudeau's father, late Prime Minister Pierre Trudeau, did to Alberta.

In 1980, the elder Trudeau brought in the national energy program, a package of taxes and rules designed to funnel more resource revenues to Ottawa while keeping the domestic price below world levels.

Alberta's premier at the time took it as a declaration of war. The elder Trudeau was despised in the province.