United Technologies has agreed to buy the airplane parts maker Rockwell Collins for $30 billion, including debt, establishing an industrial giant and cementing one of the largest deals ever in the aerospace industry.

Under the terms of the deal, United Technologies — a deeply diverse business that includes the Otis escalator and elevator brands and Pratt & Whitney, which makes high-performance aircraft engines — will pay $140 a share in cash and stock, both companies said late Monday. Rockwell investors will receive $93.33 a share in cash and the remaining $46.67 in United Technologies stock.

The price is an 18 percent premium above where Rockwell’s stock was traded on Aug. 3, a day before news reports said United Technologies was considering a bid for Rockwell.

Shares of United Technologies fell on the news. In midday trading on Monday, shares were down 4.5 percent, dragging the Dow Jones industrial average 0.8 percent lower. Rockwell Collins was trading 0.8 percent higher.