Boeing and Brazilian airplane manufacturer Embraer said Thursday that they are in discussions about a potential tie-up.

The talks are ongoing, but the companies cautioned in a joint release any deal would be subject to the Brazilian government, regulators and each companies' boards and shareholders. The talks have been happening for some time, sources familiar with the situation told CNBC.

Shares of Embraer surged as much as 25 percent in midday trading.

Boeing could face a challenge in gaining Brazilian government approval to buy the country's aviation giant. Reuters, citing a government source, reported Brazil is open an Embraer partnership — but not a total sale of the company. Any deal which transfers control of Embraer is out, according to Reuters.

The Wall Street Journal reported Boeing is open to protecting jobs, the Embraer brand or structuring a deal that will maintain Brazilian government interest in the company's defense business.

Embraer's commercial aviation CEO, John Slattery, said at the Dubai Airshow in November that the Airbus deal for control of Bombardier's CSeries should generate a higher level of activity for Embraer.

The deal in progress would be a boon for Boeing's current offerings due to Embraer's strength in regional jets. Embraer rivals Canadian aircraft maker Bombardier in commercial jets with 100 to 150 seats, a product that is center stage of a bitter trade dispute between Boeing and Bombardier.

The U.S. Commerce Department on Wednesday finalized duties of nearly 300 percent on passenger jets made by Bombardier, a win for Boeing, which lodged the complaint. The suit alleges Bombardier received unfair government subsidies and dumped narrow-body jets below cost to No. 2 U.S. carrier Delta Air Lines. The Commerce Department first recommended the duties on Bombardier's CSeries jets earlier this autumn.

Bombardier CEO Alain Bellemare on Thursday defended the discounting of new airplanes. Bellemare doesn't deny that Delta received a good price, saying early customers for a fresh product rarely pay list prices. Steep discounts are common in the industry, to draw interest and attention to new planes.

Bellmare told CNBC that Bombardier has "an aircraft that nobody produces except Embraer. The real competitor to this aircraft is Embraer, it's not Boeing."

"There's no case here," Bellemare added, calling the complaint "ridiculous."

— CNBC's Leslie Josephs contributed to this report.