Shares of Caterpillar Inc. (CAT, Financials), a maker of construction and mining equipment, surged after the firm posted record second-quarter profits that comfortably beat Wall Street estimates as demand picked up across its core sectors.

Revenue was up 24% from a year ago to $20.54 billion, exceeding the $19.2 billion average projection. It was the first quarter in Caterpillar history with sales and revenue exceeding $20 billion.

Adjusted earnings were $8.17 a share, above expectations of $6.20 a share. Net income rose to $3.59 billion, or $7.77 a share, from $2.18 billion, or $4.62 a share, a year earlier.

Power & Energy sales grew 17% on the back of demand for huge engines and turbines to power data centers. Construction Industries revenue up 35% Resource Industries revenue increased 20%.

Operating profit jumped 50% to $4.30 billion and the operating margin rose to 20.9% from 17.3%. Caterpillar generated $4.4 billion of operating cash flow and distributed $2.2 billion to shareholders in dividends and share repurchases.

The broadbased sales growth and rising backlog indicate the corporation is benefiting from both traditional infrastructure expenditure and rising AI-related electricity consumption.

Next investors will be looking at whether data-center purchases and equipment demand can keep up Caterpillar's record pace.