The port agreement is subject to approval by BHP's board and conditional on it moving ahead with Jansen's first phase, Westshore said in a release.

The world's biggest listed miner has estimated Jansen would cost up to $5.7 billion in its first phases.

The project in Canada's Saskatchewan province offers diversification into agricultural markets given that potash is a key element in plant nutrition that also makes crops more drought resistant.

"BHP confirms that Westshore Terminals Limited Partnership ... has signed an agreement to provide port services for the Jansen potash project in Saskatchewan," BHP said in a statement to Reuters.

Last month BHP said it would present its board with a decision on whether to move ahead with Jansen after choosing between two port options.

"If the Jansen project does proceed, the agreement requires Westshore to handle potash for BHP for a term to 2051, subject to extension," Westshore said.

Under the agreement, Vancouver-based Westshore would construct infrastructure to handle potash at Westshore's Roberts Bank Terminal by 2026, with BHP funding the construction.

The pact would become binding on BHP if it announces a final decision to proceed with Jansen's first stage, Westshore said.

Westshore's Toronto-listed shares climbed as much as 38% Friday.

(Reporting by Jeff Lewis; editing by Jason Neely, Kirsten Donovan)