DETROIT (AP) — For generations, the career path for smart kids around Detroit was to get an engineering or business degree and get hired by an automaker or parts supplier. If you worked hard and didn’t screw up, you had a job for life with enough money to raise a family, take vacations and buy a weekend cottage in northern Michigan.

Now that once-reliable route to prosperity appears to be vanishing, as evidenced by General Motors’ announcement this week that it plans to shed 8,000 white-collar jobs on top of 6,000 blue-collar ones.

It was a humbling warning that in this era of rapid and disruptive technological change, those with a college education are not necessarily insulated from the kind of layoffs factory workers know all too well.

The cutbacks reflect a transformation underway in both the auto industry and the broader U.S. economy, with nearly every type of business becoming oriented toward computers, software and automation.

“This is a big mega-trend pervading the whole economy,” said Mark Muro, a senior fellow at the Brookings Institution who has researched changes being caused by the digital age.

Cities that suffered manufacturing job losses decades ago are now grappling with the problem of fewer opportunities for white-collar employees such as managers, lawyers, bankers and accountants. Since 2008, The Associated Press found, roughly a third of major U.S. metro areas have lost a greater percentage of white-collar jobs than blue-collar jobs. It’s a phenomenon seen in such places as Wichita, Kansas, with its downsized aircraft industry, and towns in Wisconsin that have lost auto, industrial machinery or furniture-making jobs.

In GM’s case, the jobs that will be shed through buyouts and layoffs are held largely by people who are experts in the internal combustion engine — mechanical engineers and others who spent their careers working on fuel injectors, transmissions, exhaust systems and other components that won’t be needed for the electric cars that eventually will drive themselves. GM, the nation’s largest automaker, says those vehicles are its future.

“We’re talking about high-skilled people who have made a substantial investment in their education,” said Marina Whitman, a retired professor of business and public policy at the University of Michigan and a former GM chief economist. “The transitions can be extremely painful for a subset of people.”

GM is still hiring white-collar employees, but the new jobs are for those who can write software code, design laser sensors or develop batteries and other devices for future vehicles.

Those who are being thrown out of work might have to learn new skills if they hope to find new jobs, underscoring what Whitman said is another truism about the new economy: “You’ve got to regard education as a lifetime process. You probably are going to have multiple jobs in your lifetime. You’ve got to stay flexible.”

Whitman said mechanical engineers are smart people who could transfer their skills to software or batteries, but they’ll need training, and that takes time and money.

“In the past with these kinds of changes, eventually new jobs have been created,” she said. “Will it happen this time, or is the change taking place too fast for everybody to be absorbed? I don’t know.”

Although the job cuts took him and co-workers by surprise, Tracy Lucas, 54, a GM engine quality manager, decided to take the buyout and change careers. His children are grown and on their own, and with 33 years in at GM, he will get a pension and health care.

The buyout will also give him about eight months of pay, enough time to take his newly earned master’s degree in business administration and look for different work. He said he will be glad to leave some tedious management tasks behind but will miss seeing through a lot of work to reduce engine warranty claims.

He is leaving in part, he said, to save a job for younger co-workers. GM got 2,250 white-collar workers to take buyouts, and will have to complete the cutbacks by way of layoffs.

“I really hate that we have to go into the whole process of tapping people on the shoulder,” Lucas said. “I don’t think the second wave is going to be pretty at all. It’s going to be brutal.”

The white-collar cutbacks — combined with more to come at Ford, which is likewise making the transition from personal ownership of gasoline-burning vehicles to ride-sharing and self-driving electric cars — could hamper the renaissance underway in Detroit, which is emerging from bankruptcy and a long population decline.

Many of these automotive industry engineers and managers are pulling down six-figure salaries, and some may have to move out of the Detroit metro area for new jobs.

The Brookings Institution’s Muro wonders whether auto companies will bring more electrical engineers and software developers to Michigan or put them in places where such jobs are already clustered, such as San Francisco, Seattle, Boston or near major research universities.

“This is how regions change and labor markets change,” Muro said.

GM says it will hire in the Detroit area, but its autonomous-vehicle workforce has grown to over 1,000 at offices in San Francisco and Seattle.

Nearly all of the 8,000 white-collar cutbacks will be in metropolitan Detroit, largely at GM’s technical center in Warren, a suburb north of the city. That’s equal to about 4 percent of the managerial and engineering jobs in the Detroit-Warren area, according to the Labor Department. Managerial salaries in the area average $124,000.

Ford, which is just beginning its salaried workforce downsizing, hasn’t said how many will go. But even if it’s half of GM’s total, the white-collar losses around Detroit will approach those during the financial crisis of a decade ago, when the metro areas shed 14,450 managerial and engineering jobs. That was 8.9 percent of those types of jobs in the metro areas.

Layoffs are also likely to spread to auto parts suppliers, which won’t need to design and build as many parts for gas-powered cars.

While GM says cutting these positions is necessary to save money to invest in the new technology, there are possible long-term costs to shedding so many experienced workers in one swoop, especially if the switch to electric vehicles stalls, said Joel Cutcher-Gershenfeld, a management professor at Brandeis University. If that were to happen, the cutbacks could leave GM without the vital expertise it needs.

Even the most skilled white-collar workers need to spend less and be prepared to change jobs or locations to stay employed, said Rick Knoth, a retired GM industrial engineer who survived a 2008 downsizing by taking an early retirement package after 37 years with the company.

Knoth said he is confident most engineers are smart enough to turn their skills into a new career. But all white-collar employees need to be ready for change because it comes fast, he said.

“The world isn’t like it used to be, that’s for sure,” he said. “You can’t count on anything.”