DETROIT — As General Motors reported a healthy $2.5 billion third-quarter profit, the Detroit automaker ramped up its cost-cutting efforts by offering buyouts to 18,000 white-collar workers.

The company, while acknowledging it’s in good shape now, said Wednesday it needs to be smaller to prepare for tougher times that might be ahead as it continues to get ready for a future of electric and autonomous vehicles.

“Even with the progress we’ve made, we are taking proactive steps to get ahead of the curve by accelerating our efforts to address overall business performance,” GM said in a statement. “We are doing this while our company and economy are strong.”

Shares climbed 9.1 percent, to $36.59, on Wednesday.

Buyout offers were made Wednesday to salaried workers in North America with 12 or more years of service. GM spokesman Patrick Morrissey wouldn’t say whether the company has a target number for employee reductions, nor would he say if there will be layoffs if too few employees take the buyouts.

“We will evaluate the need to implement after we see the results of the voluntary program and other cost reduction efforts,” he said.

Workers have until Nov. 19 to make a decision, and they would leave the company by the end of the year, GM said. The company has 50,000 salaried workers in North America.

The offers came as GM’s earnings surprised Wall Street by riding strong prices for much of its model lineup across the globe, especially in the US, where it rolled out redesigned versions of its Chevrolet Silverado and GMC Sierra pickups.

“Our discipline came through this quarter,” Chief Financial Officer Dhivya Suryadevara said, adding that she believes strong prices are sustainable as GM builds inventory of light-duty pickups and rolls out heavy-duty versions.