NEW YORK (AP) — General Motors swung to a third-quarter profit and blew past Wall Street expectations on rising prices in North America and surprising resilience in China.

The automaker reported $2.5 billion in profits Wednesday, or $1.75 per share, far exceeding analyst projections for per-share earnings of $1.25.

Revenue jumped 6.4 percent to $35.8 billion, also topping forecasts. The Detroit auto maker is posting record equity income for the third quarter in China despite potentially declining conditions there and rising trade tensions.