WHEN General Motors and Chrysler were on the brink of collapse in 2009, Canada’s ruling Conservatives faced an awkward choice: stick to free-market principles and watch the Canadian subsidiaries of the two American carmaking giants go under, or contribute Canadian taxpayers' dollars towards a bail-out of the parent companies. Stephen Harper, the prime minister, stared down his right-leaning base and with the provincial government of Ontario committed C$13.7 billion ($11 billion) to rescue the carmakers. This week the government decided to sell the remaining 73.4m shares it holds in GM to Goldman Sachs, ending an unusual foray into state ownership for Canada’s Conservatives. Some are unhappy with the timing of the sale, though the proceeds will help the government balance the books in the budget to be presented on April 21st. Those who thought the rescue was a bad idea in the first place fume about a potential loss from selling the shares now of between C$3 billion and C$5 billion, given analysts' expectations that GM's shares will rise. Still, any objective observer would concede that Mr Harper achieved his goal of avoiding what he termed the “catastrophic short-term collapse” of an industry that in early 2009 employed 100,000 Canadians in assembly plants or manufacturing parts.

Yet although the bail-out was a success it was never going to save an industry in slow decline. Carmaking in Canada thrived under the protection of the Auto Pact, a deal with the United States dating back to 1965 that created free trade in cars and parts and obliged GM, Chrysler and Ford to produce at least as many cars in Canada as they sold there. Those protections were chipped away by a bilateral trade deal in 1989 and the North American Free Trade Agreement in 1994, which crucially brought Mexico into the mix. The Auto Pact ended in 2001 after the WTO ruled that it violated commitments Canada had made in 1994.

More troubles followed. The easy flow of cars and parts across the border (by one estimate car parts cross the border six times before the final product is sold) became a trickle after the 9/11 attacks prompted increased security. The Canadian dollar soared, erasing a currency advantage. And Mexico found its mojo, becoming a tough competitor for new investment in car assembly and parts. Jim Stanford, an economist at Unifor, the Canadian car-industry union, points out how hard it is to compete with Mexican wages.

Even as some of these obstacles have disappeared, Canada has not benefited proportionately. The Canadian dollar has weakened, the American economy is growing again and pent-up demand pushed sales of new cars and trucks in the United States to almost 17m last year from 10m in 2009. Most of the 2.5m cars and trucks built in Canada in 2014 were exported to its southern neighbour. Yet none of the new car-assembly investment announced last year by the world’s big carmakers was destined for Canada. “The bad news is behind us but there’s no good news in front of us,” reckons Dennis DesRosiers, an industry analyst. He predicts that Canada will continue gradually to lose its production base until “somewhere between 2030 and 2040 we’ll be Australia”, where the last carmaker with a factory in the country is scheduled to close its gates by 2018.