Image caption Toyota has been producing cars at Burnaston for a quarter of a century

Toyota's decision to invest £240m in its UK operations will be welcome news for the UK car industry.

But it comes at a time of huge uncertainty for the sector.

The UK is leaving the EU. Our future trading arrangements with Europe and the rest of the world are far from clear.

The car industry has warned that prohibitive tariffs could result in "death by a thousand cuts".

So why has Toyota decided to make this investment? What kind of guarantees has the government given the Japanese carmaker?

And has Toyota received the same sort of assurances that persuaded Nissan to commit to building new models in Sunderland?

British history

What is clear is that for a quarter of a century the UK has been a key part of Toyota's global operations.

The Burnaston plant was Toyota's first car manufacturing facility in Europe.

The first vehicle produced at the plant - the Carina E - rolled off the production line in 1992.

Image copyright PA Image caption The Avensis has been manufactured at Burnaston since 1997

Over almost 25 years it has produced more than four million cars, many of which have been exported to mainland Europe and around the world.

Today, Burnaston is home to the Toyota Auris, one of the biggest selling British-made cars in the world. Together with the Avensis, the plant produced about 180,000 vehicles last year.

Crucially, the decision to upgrade the plant to take Toyota's New Global Architecture, the firm's new system for producing vehicles worldwide, suggests it sees the UK as part of its long-term future.

Brexit impact

But the UK's car industry knows that Brexit is coming, and with it the possibility of tariffs and complex customs arrangements.

That threatens the competitiveness of carmakers that rely upon the kind of just-in-time manufacturing that Toyota pioneered.

And there are signs that the prospect of Brexit is hitting investment too.

In January the industry trade body, the SMMT, said that there was £1.66bn of committed investment announced by the industry in the UK in 2016. That was down from £2.5bn the previous year.

It wants tariff-free access to European markets. And it has warned that reverting to World Trade Organization (WTO) rules, with a 10% standard tariff on cars exported to and imported from the EU, would threaten the viability of the industry.

The SMMT says that such import tariffs could add £1,500 to the list price of imported cars.

It could cost the industry and consumers up to £4.5bn, adding £2.7bn to imports and £1.8bn to the cost of exports.

Nissan letter

That didn't stop Nissan from committing to expanding production in the UK though.

Image copyright Getty Images Image caption Both Nissan and now Toyota have made commitments to British carmaking

In October, Nissan announced that it would build two new models - the new Qashqai and X-Trail SUV - in Sunderland after receiving "support and assurances" from the government.

Nissan's boss Carlos Ghosn has since said that it would "re-evaluate the situation" once the Brexit negotiations have concluded.

Those assurances came in a letter to the firm from the Business Secretary, Greg Clark, which has never been published.

Mr Clark has said that the letter contained a number of commitments around making funds available for skills or training, supporting research and development (R&D), bringing more of the supply chain back to the UK and keeping the British car industry competitive.

He also said that the UK would seek to maintain tariff-free trade with the EU.

Pragmatic decision?

That's what Toyota and other carmakers want.

Speaking to the BBC recently at the Geneva motor show, Toyota's European boss Dr Johan van Zyl said that the focus for any Brexit deal should be frictionless trade with no tariffs or duties and common regulatory standards.

And he reiterated his commitment to the UK, in the event of a hard or soft Brexit.

"We must prepare ourselves for the worst-case scenario, be as efficient as possible, to still be able to continue with our operations in the UK," he said.

Investing in Burnaston to produce cars using Toyota's New Global Architecture appears to be part of that process. The system allows the company to utilise standardised platforms, systems and components.

Toyota also has a track record in developing lower emission hybrid electric/petrol vehicles. So the firm may have been encouraged by the government's ambition, outlined in its recent industrial strategy green paper, to make the UK a hub for next generation electric cars and battery technology.

But in the end the carmaker may simply have made a pragmatic decision about the future based on almost a quarter of a century of manufacturing in the UK.

It must now hope that both the UK and the EU will see the value in agreeing trading arrangements that will benefit all.