By Paul Vieira

OTTAWA--The Canadian federal government and the oil-rich province of Alberta agreed Thursday to support a new crude-carrying pipeline that aims to carry about one million barrels of oil daily to the Pacific coast via southwest British Columbia.

Prime Minister Mark Carney added that Ottawa, Alberta and Canada's biggest oil producers have agreed to the terms to begin construction of a carbon-capture and storage facility, which the Canadian leader said was required for Ottawa's endorsement of the new energy corridor.

The surprise agreement would give Canada ownership of a second pipeline. Canada already owns the Trans Mountain corridor, a 710-mile pipeline that carries nearly 900,000 barrels a day. Canada had to take ownership in 2018 after its original proponent, Kinder Morgan, abandoned the project due to regulatory risk. The proposed new pipeline would largely follow the existing Trans Mountain route, officials said.

Carney's gambit is another sign of his bid to position Canada as an energy-exporting superpower. Since coming to power, he has made it a policy priority to accelerate resource projects and build new trade infrastructure to help sell more of Canada's goods to Asia and Europe, and reduce its reliance on trade with a protectionist U.S. to drive growth.

Calgary, Alberta-based Pembina Pipeline will hold a 10% interest in the Canada-Alberta project, and contribute expertise on the new corridor's construction. Canada and Alberta will hold equal partnerships, with a sizable equity stake reserved for local indigenous groups, officials said.

Alberta Premier Danielle Smith had previously said she would file a pipeline proposal to the federal government on or around July 1. One of her concessions was to agree to a new route through southwestern British Columbia, as opposed to her earlier bid to build a pipeline to the northern Pacific coast.

"This is not another energy project, it's a nation-building project," said Smith, at a press conference in Calgary that Carney also attended. She said this marked a high-level agreement, with more details subject to negotiation.

Smith unveiled her intentions to champion a new pipeline in October last year, arguing that Alberta needed to take charge because of the lack of private-sector interest. Smith said companies were reluctant to take on such a project due to regulatory risk stemming from previous policies implemented by Carney's predecessor, former Prime Minister Justin Trudeau.

"This is not an expenditure. It's an investment for the benefit of all Canadians," Carney said.

Earlier Thursday, Carney struck a deal with British Columbia, in which Ottawa pledged billions in projects and reaffirmed its ban on oil-tanker traffic off the north coast. In return, British Columbia agreed to not impede efforts to build a new pipeline, and collect annual royalty payments from the pipeline owner.

Opposition in British Columbia posed a significant hurdle to a new pipeline. "Carney found a way to thread the needle and get widespread consensus on a west-coast pipeline. It's like Christmas in July," said Heather Exner-Pirot, a senior fellow and director of energy policy at the Macdonald-Laurier Institute, an Ottawa-based think tank.

Smith has said a new pipeline is a litmus test for Canada's ability to collaborate on economic initiatives that improve Western Canada's prospects and help the country diversify exports to non-U.S. markets. Alberta is slated to hold a referendum this fall about its future within Canada, as a segment of the population is pushing for independence after decades of frustration with federal environmental policies.

Earlier this week, Carney said his Liberal government needed to pivot from the environment policy implemented in the past decade. He said Canada had to capitalize on its oil and gas reserves, given increasing demand from countries leery of solely relying on the Middle East after the recent U.S.-Iran conflict.

The pipeline proposal is now subject to a federal review to determine whether it qualifies as a nation-building project, which would entail an accelerated approval process. Consultations with local indigenous communities would begin immediately, officials said.

Write to Paul Vieira at paul.vieira@wsj.com