General Motors (GM) - Get Report shares hit a 52-week higher Thursday after it posted better-than-expected second quarter earnings Thursday as strong North American truck sales helped offset an ongoing slump in China's deteriorating car market.

GM said adjusted earnings for the three months ending in June came in at $1.64 per share, down 9.4% from the same period last year but firmly ahead of the Street consensus forecast of $1.44 per share. Group revenues, GM said, came in at $36.1 billion, down modestly from last year and largely in-line with analysts' forecasts.

Looking into 2019, GM said it sees full-year earnings in the range of $5.91 to $6.75 per share, with capital expenses in the region of $8 billion to $9 billion. Adjusted earnings, GM said, were held in the range of $6.50 to $7.00 per share.

"Our results demonstrate the earnings power of our full-size truck franchise, with more upside to come," said CEO Mary Barra. "We will continue operating our business with discipline, and the vision needed to deliver a stronger future for our employees, customers and shareholders."

GM shares were marked 2.7% higher following the earnings release to change hands at $41.42 each, after hitting a 52-week peak of $41.90 earlier in the session, in a move that extends the stock's year-to-date gain to around 25%.

GM said its North American earnings rose 11.1% to $3 billion, offsetting a slump in international profits linked to a $400 decline in China income. GM delivered 747,000 vehicles in the U.S., the company said, led by record sales for crossover vehicles, which rose 17% from the same period last year.

GM China sold 754,000 vehicles in the three months ending in June, the company said, down 100,000 from the same period last year and linked to "an overall market decline, segment shifts and lower demand for outgoing models."

"Due to China's economic slowdown, China industry unit sales are expected to remain weak through the second half of the year, with industry deliveries projected to be down for the full year," GM said.