TC Energy Corp., the Canadian pipeline giant best known for its Keystone XL project, agreed to sell its holdings in three natural gas-fired power plants to Ontario Power Generation Inc. as part of a drive to fund more than $20 billion of investments.

Ontario’s province-owned utility will pay about US$2.87 billion for the 683-megawatt Halton Hills power plant, the 900-megawatt Napanee generating station and 50 per cent of the 550-megawatt Portlands Energy Centre, Calgary-based TC Energy said in a statement Tuesday.

TC Energy, formerly known as TransCanada, has already sold gas-gathering assets in the Appalachian Basin, a gas-fired power plant in Arizona, wind power facilities in Quebec and a large stake in the Northern Courier Pipeline in Alberta. The divestments will help fund a C$30 billion capital program through 2023.

With the sales of the Ontario plants, which still need regulatory approvals and are expected to close later this year, TC Energy now expects to raise C$6.3 billion from “portfolio management activities in 2019,” according to the statement.