Image copyright Getty Images Image caption Nissan's Carlos Ghosn warned it might have to rethink its UK investment in the wake of Brexit

Nissan has decided to stay in Sunderland.

The Japanese company will build the next version of the Qashqai and X-Trail in the North East.

It's a remarkable development in the light of what Nissan's chief executive Carlos Ghosn said about Brexit.

He cast real doubt over the company's commitment to Sunderland.

"If I need to make an investment in the next few months and I can't wait until the end of Brexit, then I have to make a deal with the UK government.

"If there are tax barriers being established on cars, you have to have a commitment for carmakers who export to Europe that there is some kind of compensation."

And it is certainly possible that those tax barriers could be significant.

Image copyright Empics Image caption Nissan employs 7,000 workers at its Sunderland plant

The EU imposes a tariff on car imports of 10%. Whether that will apply to British made cars, including Nissan's, will depend on the terms of any agreement negotiated with the European Union.

But one possibility is Britain trading on World Trade Organization terms with the EU - and facing the same barriers as WTO members with no trade deal. That would mean that those tariffs would apply.

Inevitably the Nissan decision has led to speculation about just what government ministers have said to the company. Has Nissan received some sort of assurance that there will be compensation if its cars do face EU tariffs?

The government says not.

Compensation conundrum

Nissan says it was given assurances that its products would remain competitive after the UK's exit from the EU.

Mr Ghosn's earlier remarks focussed on tariffs, so presumably that was at least in the minds of top Nissan managers when they received these assurances.

One option would be some sort of direct compensation to the company if it did face new tariffs on its sales into the EU.

Image copyright Getty Images Image caption The EU imposes a tariff on car imports of 10% - whether that will apply to UK-made cars is as yet unclear

That could easily fall foul of World Trade Organisation rules because export subsidies are banned - they are defined as subsidies contingent on export performance. So direct compensation for a tariff looks like it would be caught.

Some creative design of the compensation might get around it, breaking the explicit link with tariffs and export sales.

Even so Nissan's competitors in other countries would in all likelihood be alert to any such move and could still persuade a government to take the case to the WTO's dispute settlement system, arguing that the arrangement was in effect a prohibited subsidy.

The UK could then ignore the WTO ruling.

But in that event the Organisation can then authorise retaliation - additional tariffs - against a range of British exports.

In any case, British governments have generally been keen on the WTO and its system of international trade based on rules that constrain subsidies and trade barriers.

So Britain would probably be reluctant to defy a WTO ruling.

There is another possibility suggested by the former Prime Minister Tony Blair on BBC Radio 4.

"I should imagine they gave strong assurances about the car industry's access to the single market".

If that is the case it would mean no tariffs and no need for any compensation.

Image copyright Getty Images Image caption The future relationship between the UK and EU is key for many businesses

Even without the degree of access that Norway, for example, has, there is the option of seeking a trade agreement with the EU that would eliminate tariffs, if they were willing to go down that path.

Weaker pound

Nissan has already had one boost for its competitiveness.

Its cars are cheaper in foreign currency because of the decline of the pound, though that has raised the cost of imported parts.

Still, the company is unlikely to want to make any long-term assumptions about exchange rates. The fall in sterling may have helped, but would Nissan want to rely on that?

We don't know exactly what the government has offered - indeed whether it has offered anything very specific at all.

However, a trade agreement that ensured tariff-free access for British industry to the European Union market would raise fewer legal and financial challenges.