LG Electronics will pay General Motors $1.9 billion to cover almost the entire cost of a recall of fire-prone batteries in the Chevrolet Bolt electric car that has become a big problem for the automaker, the companies said Tuesday.

GM has recalled all 141,000 Bolts it has made since the car was introduced several years ago to replace battery packs that can catch on fire because of manufacturing defects. The automaker, which aims to replace all of its gasoline cars and trucks with zero-emission vehicles by 2035, has said the recall would cost $2 billion.

GM and LG have been working to produce new battery modules and expects to begin installing them in customer vehicles later this month, Shilpan Amin, the automaker’s vice president for global purchasing and supply chain, said in a statement.

“LG is a valued and respected supplier to GM, and we are pleased to reach this agreement,” he said.

The recalled Bolts use battery packs that were made in South Korea by LG. General Motors twice issued limited recalls for the car after reports of vehicles catching fire after having been fully or nearly fully charged. GM expanded the recall in September to all Bolts that have been sold in the United States, South Korea and other countries. The two companies have traced fires to two manufacturing defects that occur on rare occasions.

GM plans to introduce 30 new electric vehicles over the next four years, including 20 in the United States. Those models will use a new type of battery pack that was designed by GM and will be made by a GM-LG joint venture that has plants under construction in Ohio and Tennessee and plans to build several others in North America this decade.