Chrysler Group reversed course and agreed to a recall of 2.7 million Jeeps Tuesday, giving in to the government's request in the final hours before a deadline.

Chrysler stated last week that it would not comply with the recall demand, arguing that the vehicles do not have a high risk of catching fire when struck from behind. It continued to claim Tuesday that the vehicles -- 1993 to 2004 Jeep Grand Cherokees and 2002 to 2007 Jeep Libertys -- are safe.

Its statement said it will recall the vehicles for inspection and, in "some cases," will "provide an upgrade to the rear structure of the vehicle to better manage crash forces in low-speed impacts."

"Chrysler Group recognizes that this matter has raised concerns for its customers and wants to take further steps, in coordination with NHTSA, to provide additional measures to supplement the safety of its vehicles," the company said.

In a statement, the National Highway Traffic Safety Administration, which had asked for the recall, said it was pleased that "Chrysler has agreed to take action to protect its customers and the driving public." It went on to say that "consumers impacted by the safety recall and customer satisfaction campaign should have their vehicles serviced promptly once they receive notification from Chrysler."

NHTSA says it will continue its investigation into this issue.

According to the agreement, Chrysler won't necessarily have to repair all 2.7 million Jeeps. And rather than place the steel plate over the plastic gas tank, as public interest groups like the Center for Auto Safety had called for, it will simply install a factory trailer hitch to provide some protection in the case of a low-speed, rear-end collision.

Related: GM recalling 194,000 SUVs due to fire risk

About 1.2 million Grand Cherokees from model years 1999 to 2004 will only be called in for inspection, and if they have an after-market hitch, it will be replaced with a factory hitch. But vehicles from those model years without any hitch will not receive one.

Chrysler said it will do work on just under 1.6 million remaining of the vehicles. They include the 1993 to 1998 Grand Cherokees, as well as the 2002 to 2007 Libertys.

The vehicles in this group that already have a factory-installed hitch will not have work done. Owners who have an after-market, non-Chrysler trailer hitch will have it replaced with a factory trailer hitch. Those with without any hitch will have one installed.

If Chrysler had not agreed to act by the end of Tuesday, it faced the prospect of high-profile public hearings. There would have been testimony from both car safety advocates who have pushed for the recall, as well as the parents of children who burned to death in fires. Experts say the hearing would have caused Chrysler's reputation to take a hit, even if it had avoided the recall.

"It strikes me that Chrysler underestimated the negative publicity they'd get out of fighting, and that they decided it was better off to go ahead and do the recall," said Michelle Krebs, senior analyst at Edmunds.com. She said fighting the recall would have been "a very risky gamble," even if Chrysler had eventually been proven right.

"It's still an uphill battle for Chrysler in the perception of quality and [a hearing] could [have] set it back."

While neither Chrysler nor NHTSA has given an estimated cost of a recall, the Center for Auto Safety says it could cost Chrysler no more than $300 million to install a 3 millimeter steel skid, a fuel tank check valve and better fuel filler hose and address the problem.

The J.D. Power & Associates survey of car owners found that the number of problems reported by Jeep owners has fallen by about a third between 2008 and 2012. It has moved up in approval rankings from dead last out of 36 brands in 2008 to 23rd out of 34 last year.

An online survey by Kelley Blue Book last week found 64% of those answering the survey would not consider any vehicle from an automaker who fights a recall.

Related: How valid are car brand rankings?

However, a week of used car auctions tracked by Kelley shows no measurable change in average pricing or sales volumes of the affected vehicles. Used car site AutoTrader.com also reported no change in interest in the affected vehicles by potential car buyers visiting its site.

Chrysler still faces liability risks in numerous wrongful death suits. NHTSA says there have been least 37 accidents that caused fires and resulted in at least 51 deaths.

Krebs said she was surprised by the reversal by Chrysler, saying it appeared that Chrysler CEO Sergio Marchionne and other executives at the automaker had dug in and prepared for a fight.

Ditlow said many of the recalled cars will probably never be brought in for the inspection. He said in the case of the recall of older model cars that are no longer covered by warranties, somewhere between 50% and 60% of recalled vehicles are typically brought in by owners.

About 52% of Ford Pintos were brought in, even though that late-1970s recall -- which also involved gas tank fires -- was very high profile, according to Ditlow.

If there had been a public hearing by NHTSA, the agency could either agree with Chrysler's argument and drop the request for a recall or order an involuntary recall. If the automaker again refused to issue a recall, NHTSA could go to federal court to force a recall, though that process could take years.

There have been 17,000 recalls involving over 500 million vehicles since NHTSA started the recall process in 1966. It is rare that automakers challenge NHTSA on a recall and even rarer that one wins. Chrysler -- under different management than it is now -- was the last automaker to win such a challenge when it fought a 1996 recall of 91,000 cars in a dispute over its seat belt system.