Ottawa (AFP) - Canada must "phase out" Alberta's oil sands and end the country's dependence on hydrocarbons, Prime Minister Justin Trudeau said.

"We can't shut down the oil sands tomorrow. We need to phase them out," he said. "We need to manage the transition off our dependence on fossil fuels."

He was responding to a question at a town hall event about his decision in late November to authorize an increase in the capacity of two oil pipelines in the country's west.

Upgrading them will increase Canada's export capacity by nearly a million barrels a day.

"You can't make a choice between what's good for the environment and what's good for the economy," he said about reconciling the fight against climate change with economic growth.

Canada is the world's sixth-largest oil producer.

However, Trudeau is committed to reducing greenhouse gas emissions to meet the requirements of the United Nations Paris Agreement on climate change, which Canada has ratified.

The prime minister last year announced a national carbon tax effective in 2018.

It was supported by the province of Alberta, where the country's petroleum industry is concentrated.

But the prime minister's latest remarks on oil sands have prompted a furious response from the conservative opposition.

"If Mr Trudeau wants to shut down Alberta's oil sands, and my hometown, let him be warned: He'll have to go through me and four million Albertans first," said Brian Jean, leader of Canada's hardline conservative Wildrose Party, who formerly represented Fort McMurray, Alberta's oil capital, in Parliament.

Environmental activists are highly critical of projects involving oil sands because of their economic and environmental costs. Oil locked in the subsoil of the boreal forest must be extracted by a long, polluting and energy-intensive process.

The oil is profitable only when global prices are high. Two major oil companies, Shell and Statoil, pulled out of the Canadian oil sands late last year.