SAO PAULO/BRASILIA (Reuters) - The Brazilian government on Thursday said it would allow a proposed tie-up between planemakers Embraer SA EMBR3.SA and Boeing Co BA.N to go forward, capping weeks of uncertainty in which President Jair Bolsonaro expressed hesitation.

Slideshow ( 2 images )

The approval maintains the terms of the deal as previously proposed, with Embraer selling 80 percent of its commercial plane division, its most profitable, for $4.2 billion to Boeing, which will have total control of the new venture.

But one thing was new: the government said in a press release that the two planemakers would “maintain the current jobs in Brazil,” a move that might appease union workers and politicians who had raised concerns that, if the deal went through, Boeing would then try to slash jobs. The companies had previously been noncommittal on the issue.

The tie-up between Embraer and Boeing is seen as part of a reshaping of the global aviation market for mid-sized planes. It follows a similar deal by Boeing's rival Airbus AIR.PA which bought Bombardier Inc's BBDb.TO commercial plane division that competed with Embraer.

The deal still must now be voted on by Embraer’s private shareholders within the next 30 days, but winning the backing of Brazil’s government was its biggest hurdle.

If approved by shareholders, the companies will then have to seek regulatory approval in several countries.

The deal also faces legal challenges in Brazil. Workers and left-wing politicians obtained court orders blocking the deal in December, but the injunctions were quickly reversed. The tie-up could face future injunctions as the cases remain pending.

Minority shareholders have also filed legal complaints that have yet to be resolved.

Embraer and Boeing said in a statement they expect the deal to obtain final approvals before the end of 2019.

Boeing shares closed up 2.6 percent on Thursday and were flat in after-hours trade following the deal approval. Embraer shares on the New York Stock Exchange were up 0.4 percent after the close.

Shortly after assuming the presidency on Jan. 1, Bolsonaro, a former army captain, had expressed concern that Boeing might end up owning all of Embraer if the deal was approved under the terms proposed.

But on Thursday, a statement from his office said his government had analyzed the proposal and found that it “preserves (Brazil’s) sovereignty and the national interests.”