OTTAWA -- The federal government is set to become the official owner of the Trans Mountain pipeline expansion after failing to quickly flip the project to another private-sector buyer.

Pipeline owner Kinder Morgan had been working with the government to identify another buyer before July 22.

But with that date set to pass without a deal, it was expected the pipeline company will now take Ottawa's $4.5-billion offer to purchase the project to its shareholders.

Pending their approval, the sale, which includes the existing pipeline, the pumping stations and rights of way, and the Westridge marine terminal in Burnaby, B.C., will be approved sometime in August or September.

The $4.5-billion purchase price does not cover the construction costs of building the new pipeline, which previous estimates have pegged at around $7.4 billion.

Finding another buyer for the project before Sunday's deadline was widely considered a long shot because of the project's risks.

But the government insists it does not plan to own and operate the pipeline over the long term and is expected to continue talking to interested parties.

The government had previously indicated that there were numerous groups interested in purchasing the controversial project, including pension funds and Indigenous groups.

Finance Minister Bill Morneau's spokesman, Daniel Lauzon, said Ottawa still intends to sell the pipeline, if and when a suitable partner is identified and it's in the best interests of Canadians.

"We have no interest in being a long-term owner of a pipeline, but we will be the temporary caretaker," Lauzon told The Canadian Press on Sunday. "We won't rush that."

News of the failure to find another partner by July 22 came one day after protesters opposed to the Trans Mountain expansion took to Parliament Hill in hazardous-materials suits and carrying a fake pipeline.

It was the latest in a string of such rallies by environmental and Indigenous groups, which also included the erection of a similar cardboard pipeline outside the Canadian High Commission in London in April.

Lauzon on Sunday defended the decision to purchase the pipeline, saying the project, whose aim is to get Canadian oil to Asian markets, remains in the national interest.

The Trans Mountain expansion will build a new pipeline roughly parallel to the existing, 1,150-km line that carries refined and unrefined oil products from the Edmonton area to Burnaby, B.C.

It will nearly triple the line's capacity to 890,000 barrels a day. Trans Mountain is the only pipeline carrying Alberta crude to the West Coast and the hope is that most of the oil will end up in tankers bound for Asia.

Ottawa approved the expansion project in November 2016 and British Columbia's then-Liberal government followed suit two months later.

But four months after that, the provincial Liberals were replaced by the NDP under John Horgan, who has a coalition of sorts with the Green party that includes an agreement to oppose the expansion in every way possible.

The federal government has said its hand was forced by Horgan, who has gone to court for judicial approval to regulate what can flow through the pipeline -- a measure of opposition that made Kinder Morgan Canada, the project's original owner, too nervous to continue.

The company halted all non-essential spending on the pipeline expansion in April pending reassurances from Ottawa that the project would come to fruition.

The federal government had said Canada would cover any cost overruns caused by B.C.'s actions, but in the end that wasn't enough.

Following the government's announcement that it planned to purchase the pipeline, Kinder Morgan agreed to start construction this summer as planned.