Caterpillar Inc (CAT) reported higher-than-expected second-quarter earnings on Thursday but said sales fell as a continued slump in the global mining industry offset a rebound in the North American building sector.

The stock fell 1.7 percent to $106.57 in premarket trade.

Caterpillar, the world's largest maker of earth-moving equipment, raised its full-year profit outlook to $5.75 a share, from $5.55 a share. The outlook was lifted, in part, by a $2.5 billion stock repurchase it said it would make during the current quarter.

But the company, which had expected full-year sales in the range of $53.2 billion to $58.8 billion, adjusted its forecast lower to a range of $54 billion to $56 billion.

Caterpillar said the change reflected weak construction sales in once fast-growing markets including China, the former Soviet republics and the Africa-Middle East region.

In North America, second-quarter sales increased 6 percent, primarily due to improving demand for construction equipment in the United States.

Sales of mining equipment, which have been in a multiyear decline, fell 29 percent during the quarter, offsetting an 11 percent increase in construction equipment.

The company said profitability was also helped by a decrease in manufacturing costs - down $110 million in the quarter, thanks partly to lower material costs.

The company also said it pared its payrolls by more than 7,000 workers year over year – about 6 percent of its workforce.

Caterpillar posted a second-quarter profit of $999 million, or $1.57 a share, up from $960 million, or $1.45 a share, last year.

The Peoria, Illinois-based company, which also makes railroad locomotives as well as diesel and turbine engines, said sales fell 3 percent to $14.15 billion.

Analysts, on average, expected a profit of $1.52 a share on sales of $14.4 billion, according to Reuters estimates.