Canada’s army is getting ready to invade Puerto Rico’s airport.

The pension fund for the Canadian armed forces has won an auction to buy 50 percent of the company that operates Puerto Rico’s main airport in San Juan, The Post has learned.

Canada’s Public Sector Pension Investment Board has acquired the airport stake from Oaktree Capital, the hedge fund run by billionaire Howard Marks, who has managed the investment amid a financial crisis that has crippled the Caribbean island’s economy, sources said.

“Traffic at the airport is not what they hoped it would be,” a source said. The threat of the Zika virus is also denting the tourist economy.

In addition, San Juan is being edged out by Miami’s airport as the go-to hub for travelers to the region.

“It’s disquieting” that Oaktree is exiting after less than five years, the source added.

While Puerto Rico is getting paired with an operating partner it doesn’t know, Oaktree may still have gotten its desired return as it improved the concessions area and cut costs, including what it pays for air conditioning, insiders said.

Oaktree had acquired the management stake in 2014 when it bought AIG’s Highstar Capital. Mexican airport operator Aeroportuario del Sureste owns the other half of the airport and jointly operates it.

AIG and its Mexican partner in 2012 paid $615 million to the cash-strapped Puerto Rico Ports Authority for a 40-year airport concession, agreeing to share revenue and invest an additional $1.4 billion in the airport over the course of the lease.

San Juan’s passenger boardings from 2011 to year end 2015 have risen by 5 percent, while Miami’s have jumped 15 percent, according to FAA data.

San Juan’s Luis Muñoz International is the only airport in North America completely run by a private operator. New York’s LaGuardia International Airport in 2016 turned to private operators to build and manage a terminal.

More airport privatizations may be coming if President Trump succeeds in implementing his infrastructure plans.

Oaktree declined to comment. The Canada pension fund didn’t return calls.