Brazil's Embraer announced in July its intention to sell 80 percent of its commercial aviation business to Chicago-based Boeing for $3.8 billion. Embraer has said the deal is crucial for its survival.

The injunction emerged from a class action brought by four congressmen from Brazil's left-wing Workers Party and had been granted on Thursday.

Brazil's solicitor general's office confirmed the injunction that halted Embraer's negotiations with Boeing had been thrown out.

The government's top lawyer had asked the court to overturn the injunction, arguing that it violated the constitutional right to freedom of enterprise by interfering in the negotiations between two private companies.

Trading of Embraer ADRs on the New York Stock Exchange was halted temporarily and for 30 minutes on the Sao Paulo bourse. Embraer shares rose nearly 2 percent and then settled 0.75 percent higher than its opening price.

The two aircraft manufacturers announced in June a $4.75 billion joint venture giving Boeing a controlling stake in Embraer's commercial aircraft arm.

The Boeing-Embraer alliance, coming on the heels of the tie-up of Airbus and Bombardier announced last year, represents the biggest realignment in the global aerospace market in decades, strengthening established Western planemakers against newcomers from China, Russia and Japan.

Boeing and Embraer executives have said they are confident their deal would win regulatory and shareholder approvals by the end of 2019.

A final decision would be in the hands of Embraer shareholders. But they first need a green light from the Brazilian government, which has a golden share in Embraer.

President Michel Temer's outgoing government has said it will leave that decision to the administration of right-wing President-elect Jair Bolsonaro, who takes office on Jan. 1.

Bolsonaro and other members of his future cabinet have said they favor the deal in principle.

(Reporting by Anthony Boadle; Editing by Phil Berlowitz and Bill Berkrot)