SAO PAULO (Reuters) - Shareholders of Brazil’s Embraer SA approved a deal on Tuesday to sell 80 percent of the company’s commercial plane division to Boeing Co, enabling Boeing to compete with Airbus SE in the market for jets with up to 150 seats.

FILE PHOTO: The logo of Brazilian aviation company Embraer is seen during the Latin American Business Aviation Conference & Exhibition fair (LABACE) at Congonhas Airport in Sao Paulo, Brazil August 14, 2018. REUTERS/Paulo Whitaker/File Photo

About 96.8 of shareholders voted in favor of the deal after Embraer overturned an injunction that had put the shareholder meeting on hold. The transaction must now be approved by antitrust regulators around the world.

Embraer shares surged as much as 4.6 percent in Sao Paulo trading.

Under the terms of the deal finalized in December, Boeing will pay $4.2 billion to control Embraer’s most profitable division, supplying passenger jets to airlines.

It positions Boeing to better rival Airbus, which last year bought a controlling stake in Bombardier Inc’s CSeries planes - which also have less than 150 seats - putting Airbus in direct competition with Embraer.

Embraer shareholders’ approval of the Boeing deal caps more than a year of negotiations in Brazil since the companies announced their talks. Behind the scenes it was more than two years since the idea was presented internally to Boeing, a person familiar with the matter said in July.

Brazil’s government, which holds veto power over important business decisions at Embraer, a former state company, said last month that it would not block the partnership.

Once the transaction receives full regulatory approval, Boeing and Embraer will be joint owners of a yet-to-be-named commercial jet company, of which Embraer will own 20 percent, and Boeing, 80 percent.

The deal will provide a cash influx that the Brazilian planemaker has defended as crucial to its survival as increased competition between Boeing and Airbus squeezes out smaller rivals.

“The potential operation with Boeing will save Embraer,” lawyers for the Brazilian planemaker said in July in a court filing as it battled an earlier challenge to the deal.

Embraer executives said earlier this year they would be able to wipe out the company’s current debt thanks to Boeing’s cash, giving them what they described as a fresh start.

But critics say the arrangement will leave Embraer weaker and financially dependent on its two remaining divisions, executive jets and defense, both of which have posted losses in recent quarters.

Shareholders also approved a joint venture between the two planemakers to market Embraer’s new KC-390 military cargo jet. Embraer will retain ownership of the plane’s intellectual property, but hopes Boeing will drum up orders from allies of the United States.