Chrysler abruptly agreed to recall 2.7 million older model Jeeps June 18, reversing a defiant stance and avoiding a possible public relations nightmare over fuel tanks that can rupture and cause fires in rear-end collisions.

In deciding on the recall, Chrysler sidestepped a showdown with government safety regulators that could have led to public hearings with witnesses providing details of deadly crashes involving the Jeeps. The dispute ultimately could have landed in court and hurt Chrysler’s image and its finances.

The company said calls from customers concerned about the safety of their Jeeps played a part in its going along with the government’s request.

Earlier this month, the automaker publicly refused the government’s request to recall Jeep Grand Cherokees from model years 1993 through 2004 and Jeep Libertys from 2002 through 2007.

The National Highway Traffic Safety Administration, the agency that monitors vehicle safety, contends that the Jeep gas tanks can rupture if hit from the rear, spilling gas and causing a fire. NHTSA said a three-year investigation showed that 51 people had died in fiery crashes in Jeeps with gas tanks positioned behind the rear axle.

Chrysler had until June 18 to formally respond to NHTSA.

Two weeks ago, Chrysler said that the vehicles aren’t defective, despite prior statements to the contrary from NHTSA. The company vouched for the vehicles’ safety again June 18.

Chrysler said that dealers will inspect the vehicles and install trailer hitches to protect the gas tanks. The company said vehicles without hitches will get them, as will those with broken hitches or hitches that aren’t from Chrysler.

Chrysler Group LLC, which is majority owned by Fiat SpA of Italy, wouldn’t say how much the hitches would cost, although they sell for about $200 each on Internet sites.

Erik Gordon, a law and marketing professor at the University of Michigan, says Chrysler realized it was headed for a public relations disaster and decided to reverse course.

“What happened is they get surprised by how loud the hue and cry is. They didn’t want to take the public relations hit,” Gordon says.

Gordon says Chrysler’s image will still get dinged a little “because it looks as if they have done the right thing only because they were forced to.”

Chrysler executives probably realized that their chance for success was slim, because courts have given wide latitude to government regulatory agencies, says David Kelly, former acting NHTSA administrator under President George W. Bush.

“They have some very smart people at Chrysler and probably looked into a crystal ball and didn’t think this would end the way they wanted it to,” says Kelly. The automaker, he says, historically has been very committed to safety.

NHTSA said in a statement that it’s pleased with Chrysler’s decision. The agency plans to keep investigating the issue as it reviews recall documentation from Chrysler.

NHTSA calculated that the older Grand Cherokees and Libertys have fatal crash rates that are about double those of similar vehicles. It compared the Jeeps with the Chevrolet S10 Blazer, Ford Explorer, Toyota 4Runner, Isuzu Rodeo, Isuzu Trooper, Mitsubishi Montero, Suzuki Sidekick and Suzuki XL-7.