(CNN) — Defense Secretary Ash Carter has made it official: ISIS has saved one of its deadliest enemies, the U.S. Air Force’s A-10 Thunderbolt.

The inelegant but well-armed and well-armored ground-attack jet, nicknamed the “Warthog,” was facing quick retirement after the Air Force said it needed the money and crews being used to keep the A-10s flying for the brand-new F-35s and other missions.

Then came Operation Inherent Resolve, the U.S.-led coalition’s campaign against the Islamic State in Syria and Iraq.

“I saw some of the A-10s that are flying bombing missions against ISIL (the Pentagon’s term for ISIS) when I was at Incirlik Air Base in Turkey last December, and we need the additional payload capacity they can bring to the fight,” Carter said in testimony on the Pentagon’s Fiscal Year 2017 budget before a House Appropriations subcommittee on Thursday.

“We’re pushing off the A-10’s final retirement until 2022 so we can keep more aircraft that can drop smart bombs on ISIL,” Carter told the committee.

The defense chief said plans are to keep the A-10 in the Air Force inventory until 2022.

“As 2022 approaches, A-10s will be replaced by F-35s only on a squadron-by-squadron basis as they come online, ensuring that all units have sufficient backfill and that we retain enough aircraft needed to fight today’s conflicts,” Carter said.

The plan to keep the A-10s flying was in the Pentagon’s budget that was released earlier this month. What was new Thursday was the Obama administration’s top defense official linking that plan to ISIS.

Republican senators like Arizona’s John McCain and New Hampshire’s Kelly Ayotte had been pushing the Defense Department for months to hang on to the A-10s.

“As ISIS has learned firsthand, the A-10 represents our nation’s most effective and lethal close air support aircraft,” Ayotte said in a statement earlier this month.

“I look forward to seeing our A-10 pilots continue to make important advances in the fight against ISIL in the Middle East, boosting NATO’s efforts to deter Russian aggression in Eastern Europe, and supporting vital missions for U.S. national security wherever they are needed,” a statement from McCain .

The A-10’s role in the fight against ISIS was highlighted in Operation Tidal Wave II in November, when A-10s combined with AC-130 gunships to destroy 116 ISIS fuel tanker trucks.

Unlike the multirole F-35s that are slated to replace them, the A-10s are the only airplanes in the Air Force specifically designed for close air support, a mission that has become urgent in the fight against ISIS.

Able to circle over a target for long periods, the straight-winged Warthog is supremely maneuverable at low speeds and altitudes. So when ground troops find themselves in trouble — and too close to the enemy for fighter jets to drop bombs without risking friendly fire casualties — A-10 pilots can skim hillsides day and night, under any type of weather, and accurately and punishingly engage ground targets with the aircraft’s powerful 30 mm, seven-barrel Gatling gun, which fires depleted uranium bullets at 3,900 rounds per minute.