General Motors (GM - Get Report) posted much stronger-than-expected third quarter earnings Wednesday and said full-year profits could surprise to the upside thanks to favorable tax rates and improving performances in key markets in the U.S. and China.

GM said earnings for the three months ending in September came in at $1.87 per share, well ahead of the Street consensus of $1.25 and up 41.7% from the same period last year. Group sales rose 6.4%, the company said, to $35.8 billion, even as global light vehicle sales slipped 11.2% to 1.98 million. However, GM said it sees full-year profits at the "top of the previous range," citing favorable tax changes, with adjusted earnings of between $5.80 and $6.20 per share.

"Our disciplined approach to the U.S. market, combined with strength in China and further growth of GM Financial, drove a very strong quarter," said CFO Dhivya Suryadevara. "We will continue to take actions to mitigate headwinds including foreign currency volatility and commodity costs."

General Motors shares rose 9.1% to $36.58, a move that trims the stock's year-to-date decline to around 11% and values the Detroit-based carmaker at just over $51 billion.

GM said net income from operations in North America rose 36.7% to $2.83 billion, even as deliveries fell 9.8% to 834 million, although a rise in average transactions prices (ATP) allowed margins to improve to 10.2% even as input costs rose thanks in part to U.S tariffs on steel and aluminum imports. China deliveries were also lower, falling 14.8%, but topped the North American total at 836 million units.

The company also is reportedly offering buyouts to salaried workers to curb costs, according to the Wall Street Journal. About 18,000 workers are eligible for a buyout, the Journal reported.  

"We are doing this while our company and economy are strong," the company said in a statement to the Journal.

Meanwhile, last week, Ford Motor Co. (F - Get Report)  topped Street estimates by a penny with third-quarter earnings of 29 cents per share on sales of $37.6 billion that were just shy of the consensus forecast. Ford also reiterated its full-year guidance Wednesday, which calls for adjusted earnings between $1.30 to $1.50 per share and positive cash flow that will be lower than in 2017.

Ford CEO Jim Hackett did not provide more clarity on the restructuring program, but said the quarter shows Ford's business remains strong in key areas, the company continues to make progress on its efforts to redesign the business to be far more "competitively fit," disciplined in capital allocations and nimble enough for a fast-changing world.

"With products like the Edge ST and Ranger launching in the United States and the Territory SUV in China, we are also building momentum shifting our product portfolio to build on our strengths and meet shifting consumer demand," Hackett said.

Ford shares rose about 1% to $9.55. 

However, the world's biggest car market is showing persistent signs of weakness in the face of the U.S.-China trade war, and car sales in China fell 11.6% last month to 2.39 million units, the biggest slump in at least seven years, according to official data from the China Association of Automobile Manufacturers.

Ford, as well as GM, may also be vulnerable to any disruption in the China supply chain should Beijing -- or President Donald Trump -- up the stakes in their current trade standoff that has slapped tariffs on more than $300 billion worth of goods. U.S. International Trade Administration data showed that U.S. automakers imported $18 billion worth of car parts from China last year, including nearly a third of all braking system components.