Japanese carmaker Nissan will build its new Qashqai model in Britain despite the vote to quit the EU, giving Prime Minister Theresa May her most important corporate endorsement since the Brexit referendum in June.

The decision to build the new model at Britain’s largest car plant, rather than elsewhere in Europe, was won with what a source described as a package of support pledged by May’s government to counter any damage from leaving the EU.

“This vote of confidence shows Britain is open for business and that we remain an outward-looking, world-leading nation,” May said in a statement.

Britain’s big carmakers are nearly all foreign-owned and ship more than half of their exports to the other 27 countries in the European Union.

They had collectively warned that the June vote would make Britain a less-attractive destination for foreign investment, and Nissan in particular had threatened to halt spending unless the government guaranteed it would be protected.

Sunderland, in the north east of England, built almost one in three of Britain’s cars last year. The decision over the new model was crucial to the fate of its 7,000 workers.

Chief Executive Carlos Ghosn, who met May earlier this month, said the British government had promised to ensure the competitiveness of the plant, convincing the firm to build the next version of the Qashqai there and also start production of a new SUV, the X-Trail.

“The support and assurances of the U.K. government enabled us to decide that the next generation Qashqai and X-Trail will be produced at Sunderland,” Ghosn said.

Japan’s Nissan is part of an alliance with French carmaker Renault, its largest shareholder. Ghosn runs both companies.

The firm made the formal announcement after Reuters reported that the decision had been taken. A separate person familiar with the situation told Reuters that the British government had pledged to provide additional relief to Nissan in the event of any negative effect on its business resulting from Brexit.

A company spokesman said that assurances from the government had helped the firm bring forward its decision, which had originally been expected early next year.

The Sunderland plant has been a point of pride for May’s Conservative Party since then-Prime Minister Margaret Thatcher persuaded Nissan to open it in 1984, beginning a recovery in British carmaking that had nearly collapsed in the 1970s.

The area, like other parts of England’s industrial north, voted heavily in favor of Brexit on June 23, despite car manufacturers and their unions campaigning to stay in.