(Reuters) - Caterpillar Inc's CAT.N results smashed expectations and the company raised its full-year forecast for the second time, underscoring strength across its businesses and a steady recovery in demand from China.

FILE PHOTO: The logo of the company of machinery Caterpillar (CAT) is seen at the site of a future urban project in Vina del Mar, Chile May 23, 2017. REUTERS/Rodrigo Garrido/File Photo

Shares of the world’s largest construction and mining equipment maker rose as much as 5.4 percent on Tuesday to touch a more than five-year high.

Caterpillar’s strong results are the clearest indication yet that the company is turning a corner after weak commodity prices and global economic uncertainty hit demand for its iconic yellow earth-moving equipment in the past few years.

JPMorgan Securities analyst Ann Duignan called the results a solid “beat and raise” even as expectations were high coming into the quarter.

Sales rose at all three of the company’s main businesses, with the resource industries unit, which makes mining equipment, reporting the biggest jump compared with a year earlier.

While acknowledging that markets remain challenged, Chief Executive Jim Umpleby said “construction in China and gas compression in North America were highlights in the quarter.”

Total sales rose 9.6 percent to $11.33 billion and handily beat analysts’ average estimate of $10.93 billion, according to Thomson Reuters I/B/E/S.

Sales from Asia Pacific, Caterpillar’s third-biggest market, jumped 23 percent in the quarter, boosted by an increase in construction equipment sales in China.

Demand for construction equipment in China is gaining momentum after bottoming out last year, driven by a Beijing-backed infrastructure push, a housing boom and increased investment linked to China’s modern-day “Silk Road”.

Sales in North America, Caterpillar’s biggest market, were up 7 percent, largely due to improving demand from the mining and energy industries as commodity prices increase.

Most of the demand in the oil and gas business came as rigs got back to work, but Caterpillar cautioned that prices would need to stabilize at “these higher levels” to drive long-term demand for equipment.

The number of operational rigs in North America has more than doubled from its lows last year. But oilfield services providers such as Halliburton Co HAL.N have warned that growth in rig count was showing signs of plateauing.

Caterpillar said it now expects 2017 adjusted earnings of about $5 per share, up from the $3.75 it had previously forecast.

The company lifted its full-year sales and revenue forecast to a range of $42 billion to $44 billion, from its previous forecast of $38 billion to $41 billion.

Net income rose about 46 percent to $802 million. Excluding items, Caterpillar earned $1.49 per share, handsomely beating the average estimate of $1.26 per share.

Caterpillar's shares were up 5.1 percent at $113.70. Up to Monday's close the stock had gained 16.6 percent this year, outperforming the Dow Jones Industrial Average's .DJI 9 percent rise.