General Motors moved Tuesday to prevent future safety lapses by expanding its oversight of problematic vehicles even as the automaker continued to take an aggressive legal posture in dealing with its past missteps.

The company has asked a federal bankruptcy judge to dismiss dozens of potentially costly lawsuits filed against the company regarding its handling of a defective ignition switch in millions of cars, and to bar similar cases in the future.

The legal filing, made late Monday in the U.S. Bankruptcy Court for the Southern District of New York, asked the judge who approved the company’s 2009 restructuring agreement to explicitly enforce a provision that shielded the “new” company from liability for incidents that took place before July 10, 2009, the day the agreement went into effect. Most of the cars in the recall were manufactured before 2009.

Although the motion was merely asking Judge Robert E. Gerber to reaffirm a protection that already existed in the agreement, it was seen as a shrewd tactic to get the cases dismissed in one move, saving the company enormous amounts of time, personnel and money that would come from fighting to dismiss each case one by one.

Save 75% on a Digital Subscription Today

“They’ve gotten a lot of bad publicity, and the sooner they can get this literally off the front page the better off they will be,” said Walter W. Miller Jr., a bankruptcy-law professor at Boston University. “If the judge is going to make a ruling up front, you’re likely not going to have endless disputes with each case as it comes along.”

But the move carried risks, too. A coalition of eight class-action plaintiffs countered with a lawsuit in the same bankruptcy court seeking to void that part of the restructuring agreement and accusing GM of committing bankruptcy fraud by not disclosing potential liabilities from the faulty switch. GM has acknowledged that it knew about problems with the switch internally for more than a decade before it recalled 2.6 million vehicles this year.

“It appears that Old GM intentionally and fraudulently concealed the defective Ignition Switch from the Bankruptcy Court and parties in interest,” the suit said.

GM’s motion listed 54 cases that have been filed since Feb. 27, all but two of them seeking class-action status, and all of them claims for economic damages like a lower car value or missing work while it was repaired.

In both the filing and in public statements made by GM executives, the company stressed that it was not asking for the dismissal of personal-injury lawsuits related to the faulty switch, which can, if jostled, shut down the power in a moving car, disabling air bags and impairing power steering and braking systems. The company now links the problem to 13 deaths.

After the bankruptcy-court filing, the company issued a statement Tuesday saying that it was continuing to investigate ways to compensate accident victims outside of the courts.

“General Motors has taken responsibility for its actions and will keep doing so,” it said. “GM has also acknowledged that it has civic and legal obligations relating to injuries that may relate to recalled vehicles, and it has retained Kenneth Feinberg to advise the company what options may be available to deal with those obligations.”

As part of the restructuring of its engineering department, GM also announced the retirement of its top engineer, John Calabrese.

Calabrese, a GM employee for 33 years, had been vice president for global engineering since 2011. During his tenure, the company mounted a number of internal investigations into the problem but failed to recall the cars until this year.

Mark Reuss, GM’s executive vice president for product development, said that Calabrese’s retirement was not related to the ignition-switch problems.

The company said Calabrese would remain on the job until August and “assist in the transition” to the new engineering organization.

GM has hired outside lawyers, led by a former U.S. attorney, Anton Valukas, to uncover why the recall was delayed for more than a decade, even though the company had evidence of switch problems dating back as early as 2001.

Calabrese is the third senior executive to leave GM since the recall after the departures this month of Selim Bingol, the company’s head of communications and government policy, and Melissa Howell, its chief of human resources.

The company has also suspended two lower-level engineers, Raymond DeGiorgio and Gary Altman, for their roles in the recall crisis.

The company’s vast engineering operations will now be divided into two separate groups — a global product integrity unit, and a global vehicle components and subsystems department.

Reuss also said that GM would add 35 new “product investigators” to help identify safety and other mechanical problems with its vehicles. Currently, the company has about 20 such investigators, he said.

“They are the first line of making sure problems are seen,” Reuss said. “They are the data miners, and the field investigators of that data.”