When Nissan announced it would not, after all, produce its new X-Trail in Sunderland, this was reported as proof of an impending Brexit disaster. A Labour councillor in South Wales even suggested that ‘all those who voted to leave should be laid off first’. But Nissan’s decision has little to do with Brexit, and everything to do with the turmoil of the global car industry.

It is not that overall car sales are plunging — they grew by a modest 0.5 per cent across Europe last year. The problem is that established carmakers have failed to keep up, and their future now looks far more uncertain than it did even just a few years ago.

BMW, Mercedes, Volkswagen, Nissan: for decades, the same names ruled. It was a complacent industry, and progress was incremental. Every five years or so, a new model of car would be brought out that was slightly better, slightly more efficient than the last. The domination of the internal combustion engine meant that this piece of late 19th--century technology set a huge entry barrier to new entrants. You couldn’t set up a car company from scratch and hope to steal a march on the established players.

So they scoffed at suggestions that their world might be upended by electronic cars, ride-sharing apps like Uber — which could mean fewer people owning cars — or various degrees of driverless technology.

But life has come at them hard. Tesla has proved that there is a large market (and long waiting lists) for premium models — and, so far, the company has defied the short-sellers who have bet on its demise. As for self--driving technology, it is Google which has led the way, investing more than a billion dollars. A fatal accident last year hasn’t deterred Uber either. Eager to catch up, Toyota recently invested $500 million in Uber to help develop self-driving technology.

Another upstart in the automotive sector is Dyson, which since 2015 has been investing £2.5 billion to develop, in Wiltshire, an electric car with some element of driverless control. Driverless technology is crucial for the future shape of the automotive sector because it promises to slash the cost of taking a taxi — which could undermine car owner-ship altogether, at least in cities.

Alternatively, it may turn out that hydrogen fuel cells prove to be the low-emission, carbon--neutral long-term replacement for petrol and diesel. Toyota is certainly looking that way — it recently launched a hydrogen car, the Mirai. Hyundai, too, is investing heavily in hydrogen, last December announcing a £5.5 billion investment in the technology The battle between the two — hydrogen vs electric — has been dubbed by analysts at KPMG the car industry’s ‘Betamax vs VHS’ moment, echoing the big battle over video technology in the 1980s. Electric cars ought to be more efficient, as hydrogen first has to be extracted from water — there being no natural earthly source for pure hydrogen. But then, unlike battery cars, hydrogen cells can be refuelled in minutes. That is one reason why, according to a survey by KPMG, motor executives believe battery cars will eventually lose the battle. But nobody knows, which is what makes the future so uncertain for the car industry. And we all know how the video battle played out — a victory for VHS before it, in turn, was blown away by DVD.

But the bigger factor in the car giants’ malaise is the way governments have sought to speed up the car revolution by killing off traditional engines. What did for the Sunderland X-Trail — a big, bad diesel car — was not Brexit but Michael Gove’s announcement in July 2017, echoed in France, that all new diesel and petrol cars will be banned from 2040. Then came initiatives like London’s Ultra-Low Emissions zone, which will impose new charges on older diesel vehicles entering the congestion charge zone from this year.

You can see versions of this all over the western world. A recent German court ruling allowed cities to ban diesel cars completely. With restrictions in Belgium and the Netherlands too, motorists are becoming reluctant to buy them. On top of this, Nissan had been struggling to make its diesel X-Trail compliant with the latest EU emissions regulations. When the company made its pledge in 2016, things looked very different than they do now.

The technology now on the way — be it battery, hydrogen cell or something else — is not necessarily going to be developed by the old players. Meanwhile, the old companies are being shaken by scandal. Martin Winter-korn had to quit as chairman of Volkswagen after the company was found to have cheated in emissions tests when it was struggling to develop cleaner engines. A few weeks ago, BMW was fined $10 million over its handling of a spate of engine fires in South Korea. Carlos Ghosn, the Nissan chief executive who made the decision to build the X-Trail in Sunderland, is currently on charges for fraud, and the company is to be run by a more Japan-centric management.

Cities are also becoming hostile environments for cars — with congestion charges and ever-tighter parking restrictions. It’s not that cars will disappear — but in future, urbanites will be far less likely to own them and more likely to hire them on an intermittent basis. While the number of UK residents with a driving licence continues to creep upwards, there has been a huge shift in the age profile over the past quarter century. In 1994, half of 17- to 20-year-olds could drive; now it’s less than a third. How many of the Uber generation will ever own a car? No one knows, but if you are a car manufacturer whose business model assumes the continued growth of what Mrs Thatcher liked to call ‘the great car economy’, with two cars on the driveway of the archetypal middle-class home, it is enough to put your strategy in a spin.

As manufacturers wrestle with the consequences of these various trends, factories are closing at an increasing rate. GM is closing five plants across the US and one in Canada as it seeks to invest more in electric vehicles. Ford has just cut 1,600 jobs in Germany as it, too, seeks to invest more in electric cars. The people of Sunderland — where, by the way, Nissan is not proposing to cut a single job, only to cancel a planned expansion of its existing plant — are the lucky ones. Nissan’s factory there is one of the most efficient in the world and not so long ago was producing more cars than the whole of Italy.

No one yet knows who the winners of Carmageddon will be, but for the moment initiative seems to be slipping away eastwards. China, until recently damned as the dirty man of the world for its fondness for opening new coal-fired power stations, has taken to electric vehicles with an enthusiasm greater than anywhere else. In 2018, the Chinese bought a million electric cars, a 60 per cent increase in two years — this in spite of an overall fall in car sales in the country. That is why James Dyson has relocated his company HQ to Singapore — to be closer to the epicentre of the electric car revolution.

Western luxury carmakers, who for years have relied on selling their products to a fast-expanding Chinese middle class, are suddenly looking flat-footed. It was principally falling Chinese demand which led Jaguar Land Rover to announce last month that it is chopping 5,000, or one in eight, UK jobs — although inevitably that too was mistakenly interpreted as a consequence of Brexit.

It is easy to exaggerate trends. While diesel sales are in steep decline, electric vehicles still account for no more than 2 per cent of new vehicle registrations in most European countries (Norway, on nearly 40 per cent, is an outlier). By some estimates, at the end of the next decade, one in five cars bought in America will be electric. But for the moment, it is petrol and petrol hybrids which are filling the gap as consumers turn away from diesel (sales of which were down 18 per cent in the third quarter of last year, while petrol sales rose 15 per cent).

Battery technology is developing fast, and the price of the batteries falling fast, but it may never advance to the stage where electric cars are a viable alternative to petrol and diesel for long journeys in remote areas. And Emmanuel Macron is learning the hard way what happens to politicians who get too carried away with green taxes: the rise of the gilets jaunes has shown the hazards of unleashing policies designed around the needs of cities on to rural populations, for whom, for the moment, old-fashioned cars provide the sole means of practical transport.

But if the electric car is to be part of the future, Nissan and Sunderland have a head start, because for several years they have been making the world’s number one electric car for the mass market, the Leaf — a vehicle whose development was championed by the fallen Carlos Ghosn. The environmentally conscious would surely prefer this vehicle to be made in Britain in place of the X-Trail. Other carmakers are now rushing to catch up: Volkswagen is spending $40 billion over the next five years to electrify its 300-odd models.

There is no guarantee that either Nissan or its Sunderland plant will be around in 20 years. Today’s electric vehicles may by then be museum pieces, driven out by hydrogen or something we have yet to discover. But whatever technology does come to take over the car market, you can be sure that it will have been developed in an economy that supports innovation, and which has the lowest possible barriers to hiring the required talent from around the world.

So in that sense, the Nissan story is related to Brexit. It’s a reminder that the world economy is fast changing — and that success will go to whoever can step up a gear.