The president of OPEC urged Canada on Tuesday to invest in infrastructure to move oil and gas, or risk watching investment flow away to the United States.

The Canadian government agreed in May to buy the Trans Mountain oil pipeline and a related expansion project from Kinder Morgan Canada for C$4.5 billion ($3.4 billion), highlighting the lengths deemed necessary to overcome stiff opposition to such projects.

Insufficient space in the country’s oil pipelines has deepened the discount Canada’s heavy crude can attract from U.S. refiners, compared with U.S. light oil futures…