Warren Buffett’s Berkshire Hathaway Inc. agreed to buy Precision Castparts Corp., the maker of equipment for the aerospace and energy industries, in a deal valued at $37.2 billion.

As demand for new planes has been accelerating, Precision Castparts has been snatching up rivals. First, Precision said it would buy Composites Horizons LLC, which makes high-temperature composites used in engines, from American Industrial Partners for undisclosed terms. Then, Precision said it would purchase Noranco Inc., which makes fabricated parts for engines and landing gear, from MidOcean Partners and PSP Investments, for $560 million. For more, see Precision Castparts Picks Up Airplane Parts Maker Noranco from MidOcean Partners and PSP.

Buffett’s firm will pay $235 a share in cash, and take on Precision Castparts’ net debt, the companies said Monday in a statement. That’s 21 percent more than Friday’s closing price for the Portland, Oregon-based company, which had dropped 17 percent in 12 months amid the slump in energy prices.

The deal is one of the largest by Buffett, who has been building his Omaha, Nebraska-based firm in recent years with the acquisition of industrial companies such as Iscar Metalworking in 2006 and chemical maker Lubrizol in 2011. It will also help work down a cash pile that climbed to more than $66 billion at Berkshire as of June 30.

“I’ve admired PCC’s operation for a long time,” Buffett said in the statement. “It is the supplier of choice for the world’s aerospace industry, one of the largest sources of American exports.”

The target company uses advanced engineering technology to make metal industrial components for jet engines and power plants as well as pipes for the oil and gas industry. It employs about 30,000 people and produced $2.6 billion of pretax operating income on $10 billion of revenue in its last fiscal year.

Operating Margin

Precision Castparts said in July that it expects $10 billion to $10.4 billion of sales and an operating margin of about 27 percent in its current fiscal year, which ends in March. Last year, 70 percent of its sales were made to the aerospace industry, with another 17 percent going to the energy market. The company’s customers include General Electric Co., Boeing Co. and Airbus Group SE.

In 2010, Buffett spent $26.5 billion in cash and stock for the portion of Burlington Northern Santa Fe that Berkshire didn’t already own, valuing the railroad at about $34 billion. Berkshire also agreed to take on about $10 billion of BNSF debt.

Buffett doesn’t pay a dividend and rarely repurchases shares, meaning he may have to pursue more megadeals, said Meyer Shields, an analyst at Keefe Bruyette & Woods.

“This is going to be a recurring phenomenon where the businesses in the aggregate are spinning off so much cash that you can go out and buy another business,” Shields said before Monday’s deal was announced.

--With assistance from Michael J. Moore and Matthew Monks in New York and Noah Buhayar in Seattle.

Mergers & Acquisitions’ Demitri Diakantonis contributed to this report