NEW DELHI — India on Friday signed an $8.78 billion deal with France to buy 36 Rafale fighter jets in “ready to fly” condition, meaning they will be made in France.

The agreement to replace older planes in the Indian air force is a departure from an earlier plan to purchase 126 Rafales, mainly to be built in India.

The first of the Rafales, made by Dassault Aviation, will be delivered in three years and the last in 5½ years, the Press Trust of India news agency reported.

Talks between France and India over the purchase began four years ago. The deal, signed by Indian Defense Minister Manohar Parrikar and his visiting French counterpart Jean Yves Le Drian, includes a clause stipulating that Dassault will invest about 30 percent of the contract price in India’s domestic aeronautics-related programs and 20 percent in the licensed manufacture of Rafale components, according to Rahul Bedi, an analyst for the Jane’s Information Group.

India has become the world’s biggest arms importer, with an economic boom enabling it to modernize its military. Major arms manufacturers are wooing the country as it replaces its obsolete Soviet-era weapons and buys new equipment.

The Indian air force has an approved strength of 42 squadrons with 16 to 18 aircraft each, but at present has only 32 squadrons, said Praful Bakshi, an aviation expert.

France has used Rafales in several combat missions in recent years: over Libya in 2011, in Mali last year and currently as part of the international campaign against Islamic State group militants in Iraq from a French air base in the United Arab Emirates.