General Motors said Monday that it had agreed to sell its Opel and Vauxhall brands to Peugeot in a $2.3 billion deal, exiting a European market that has not produced a profit in nearly 20 years. (Bartek Sadowski/Bloomberg)

With General Motors’ decision to abandon the European car market by selling its Opel brand, chief executive Mary Barra is making good on her vow to refashion the 109-year-old goliath’s sell-everywhere-to-everyone ethic into one driven by share price.

“They want to change the culture, get out of a money-losing business . . . and send a message that they really want to focus on places they think that on the long-term basis, they can generate a return,” said Matthew Stover, an analyst with Susquehanna Financial Group.

The largest U.S. car company by sales said Monday that it had agreed to sell its Opel and Vauxhall brands to Peugeot in a $2.3 billion deal, exiting a European market that has not produced a profit in nearly 20 years. PSA, the maker of Peugeot and Citroën cars, is 14 percent owned by the French government.

“It’s very smart,” former GM vice chairman Bob Lutz said. “GM gets rid of a perennial loser.”

[GM pulls back from European auto market]

GM’s exit from Western Europe to concentrate elsewhere doesn’t come without risk, including giving up market share and expertise. GM sold 1.2 million cars in Europe last year. And Germany, where Opel is headquartered, is considered the industry’s birthplace and a primary source for engineering and design innovation.

“The risk is that they will need that volume in Europe to absorb investment costs for vehicles they also sell around the world,” Stover said. “The Cruze here in North America shares a common platform with products in Europe.”

Another risk: GM is leaving one of the world’s biggest markets.

Barr is under pressure to improve the stock price, which was more than $37 a share Monday, below the $40 when she took over in January 2014. It has jagged above $30 for most of her tenure but hasn’t climbed back to $40.

“By immediately improving General Motors’ overall business profile, the transaction will enable us to increase our returns to shareholders,” GM President Dan Ammann said at a news conference early Monday in Paris, according to Automotive News.

The U.S. auto manufacturer said it would take a $4 billion charge on the Opel sale, which also frees up cash that it will use to help buy back its shares and invest in new initiatives. The company said it plans to buy back $4 billion of its stock this year.

The company is also spending money on a line of electric cars, including the Chevrolet Bolt, as well as investments such as its $500 million interest in the popular Lyft ride-hailing service.

Analysts called the sale a welcome course correction for GM, whose 2009 federal bailout was justified on the grounds that the car manufacturer’s bankruptcy could help drag the United States into a second Great Depression.

Once referred to as a health-care company on wheels because of its massive pension and health-care obligations, GM has since reconstituted itself into a profitable business built around strong North American and Chinese sales.

“We are disrupting ourselves, so we’re not trying to preserve a model of yesterday,” Barra told Business Insider in November 2015.

“The history behind GM has always been slow to respond to anything,” said analyst Bill Selesky of Argus Research. “Mary Barra is saying, ‘We are going to be more proactive.’ ”

The company had revenue of $166 billion last year on record sales of 9.97 million vehicles. Sales in China topped the list, with 3.87 million units sold, while North American sales were 3.6 million. The company has $27 billion in unfunded pension obligations and nearly $80 billion in debt.

“GM is doing phenomenally well,” said Ivan Feinseth, chief investment officer at Tigress Financial Partners. He has a “strong buy” rating on the company, saying, “They have the best lineup of cars in the history of the company.”

GM has owned Opel, based near Frankfurt and widely seen as a German brand, since 1929.

If the deal goes through later this year, GM will have all but rolled out of Europe, where rival Ford has thrived. GM sells Chevrolet Corvette sports cars in Europe but has been unable to establish a beachhead with its Chevrolet brand.

“Ford enjoys a huge and wildly profitable commercial-vehicle business in Europe,” said Lutz, onetime chief executive of Ford of Europe. “GM has never been able to penetrate that market. They missed the boat on that over 30 years ago. It would require several billions” to match Ford.

European drivers prefer diesel motors over conventional gasoline-powered vehicles. And they do not share Americans’ love for pickup trucks and SUVs — the strongest anchors of GM’s lineup.

GM had justified its Opel investment over many years of losses on the grounds that it provided engineering that could be used to develop small cars in other markets — a line of business it thought had growth potential. But with gas plentiful and cheap, sport-utility vehicles and pickup trucks, not small cars, are driving much of GM’s North American sales.

Ammann echoed that Monday, saying the European auto market had changed so dramatically that only 1 in 5 Opels could be sold in other regions.

Why did GM keep Opel for so long? “The next ‘five-year business plan’ always showed a great hockey stick with profits just around the corner,” Lutz said.