NEW DELHI (AP) — India retired its last fleet of Soviet-era MiG-21 fighter jets Friday, ending more than six decades of service with an aircraft once celebrated for its combat prowess but later derided as a “flying coffin” due to frequent crashes.

The phaseout underscores the urgency for the Indian air force to expand and modernize its air fleet to counter potential threats on two fronts from its archrivals China and Pakistan.

The decommissioning leaves the air force with 29 fighter squadrons, well short of the 42 endorsed at one time by the government.

Each squadron comprises 16-18 fighter jets.

“If the drop in India’s fighter fleet is not arrested quickly, it will make it challenging to counter neighboring adversaries that have advanced jets for modern day warfare,” said N.C. Bipindra, a New Delhi-based defense analyst.

India is banking on speeding the introduction of homegrown Tejas light-combat jets and possibly acquiring foreign fighters that would largely be built locally to supplement its depleting strength, government officials said.

India currently operates a fleet of French-made Rafales, Mirage 2000, Russian Su30s, MiG-29, and Tejas, among others.

Inducted in the 1960s, the needle-nosed MiG-21 formed the backbone of the Indian air force and saw action in wars with Pakistan and China. But frequent crashes of the supersonic warplane drew safety concerns. Despite several upgrades, the plane’s technology remained outdated and difficult to maintain.

According to official data, India procured 872 MiG aircrafts of various models between 1966 and 1980, making it the biggest operator of the aircraft in the world.

Between 1971 and April 2012, as many as 482 MiG crashes were reported, killing 171 pilots, 39 civilians, 8 service personnel and 1 aircrew. Human error and technical issues were cited as the causes.

The crash data has not been updated since.

The crashes earned the fighters a grim nickname of “flying coffins” and inspired a blockbuster Bollywood movie “Rang De Basanti” in 2006 based on the death of a young MiG-21 pilot.

On Friday, the fighter was accorded a colorful farewell with a last sortie led by Air Force Chief, Air Marshal AP Singh in the presence of Defense Minister Rajnath Singh at the northern Indian air base of Chandigarh. Upon landing, the fighter was accorded a water canon salute.

“The MiG-21 has the distinction of being an aircraft which has trained generations of Indian fighter pilots. It was a joy to fly. It made me the fighter pilot I am today,” air force Group Capt. Indranil Nandi said.

The MiG-21 was once the most widely exported fighter, but only a few countries, including Cuba, Yemen, Syria, North Korea and some African nations now fly the updated variants in limited numbers.

To boost its depleted fighter strength, the air force has contracted to buy 87 Tejas from state-run Hindustan Aeronautics Limited. The deliveries expected last year have been delayed largely due to shortages of engines that must be imported from the U.S.

On Thursday, the Defense Ministry signed another contract with Hindustan Aeronautics Limited to procure additional 97 Tejas for the air force. Deliveries are expected to start in 2027.

The air force is also considering a proposal in an early stage of procuring Rafale fighter jets that would be built locally by French company Dassault Aviation in partnership with an Indian firm.

The U.S is also keen on supplying the F-35 stealth fighters to India, but New Delhi hasn’t shown its inclination yet as it pushes for procurement of locally made jets.