Canadian Prime Minister Justin Trudeau last week repeated his opposition to a US proposal for an import tax, telling energy executives gathered in Houston that a levy would hurt both economies.

"Anything that creates impediments at the border, extra tariffs, new taxes is something we're concerned with," Trudeau told delegates at the CERAWeek energy conference in Houston, adding: "You're going to be hurting not just the Canadian economy but the American economy as well."

Trudeau, in a first for a Canadian prime minister,  was in the spiritual home of the US oil industry to deliver a keynote address to the annual conference that attracts legislators, energy executives, innovators and experts from around the world.

His comments on the importance of avoiding a levy at the border — as proposed by the Republican leadership in the US — came in a question-and-answer session following a speech where Trudeau made the case for investing in Canadian natural resources, even while his Liberal government is preparing for a future without fossil fuels.

“Nothing is more essential to the U.S. economy than access to a secure, reliable source of energy,” Trudeau said during his speech. “Canada is that source.”

Trudeau talked up the connection between resource development and taking care of the environment, a message he has also been taking to Canadians.

He has been trying to convince skeptics on both sides of the political spectrum that the country needs both new pipelines and a carbon-pricing plan meant to cut back on greenhouse gas emissions.

Trudeau noted his government approved two pipelines — Trans Mountain’s Kinder Morgan line and Enbridge’s Line 3 rebuild — and welcomed the news that US President Donald Trump wants to move ahead with the Keystone XL pipeline project that TransCanada proposed nearly a decade ago.

“I make no bones about it: We’re proud of this. It’s progress. It’s important,” said Trudeau.

But he argued that other things are important too.

“Let me be very clear: We could not have moved on pipelines had we not acted on climate,” Trudeau said.

Trump has vowed to boost fossil fuel production through easing regulations. That stance, and his tough-on-trade approach could challenge Trudeau’s vision for a clean-energy future.

The Conservatives have been highly critical of the Liberal plan to require all provinces and territories to have some form of carbon pricing in place by 2018, suggesting that is frightening foreign investors away.

Last week brought news of more international energy giants abandoning the Canadian oilsands: Netherlands-based Royal Dutch Shell and Houston-based Marathon Oil are selling their stakes to Canadian Natural Resources for $12.74 billion in cash and shares.

The move shows that at a time of lower crude prices, and the quick growth of less costly shale oil, foreign companies are taking another look at their investments in the costly and carbon-intensive Alberta oilsands.