WHEN Qatar celebrated its national day in December, warplanes whizzed over the seaside corniche in quick succession: six French-made Mirage fighters, six cargo planes and a squadron of propeller-powered trainers. That was half of the air force. The world’s wealthiest state, with a native population of only 300,000, has never been known for its martial prowess. The first three aircraft deployed to enforce a no-fly zone over Libya in 2011 had to make emergency landings in Cyprus.

Yet Qatar plans to increase the size of its air force. Since June it has signed $20bn in contracts to buy 96 new jets from three countries: F-15s from America, Typhoons from Britain and Rafales from France. The shopping spree is one side-effect of the nine-month-old blockade of Qatar by Bahrain, Egypt, Saudi Arabia and the United Arab Emirates (UAE). The quartet wants Qatar to end its support for Islamist groups, among other things. But the move has awakened rare displays of nationalism in the tiny emirate, the military build-up being one example. “We need to plan for the worst,” says Khalid al-Attiyah, the defence minister. “I still see $25bn as not enough.”

Western defence officials already wonder how Qatar will incorporate the new kit. The standing army numbers just 27,500 men. Fewer than 10% are in the air force, which will need hundreds of new pilots to fly an expanded fleet. The air academy graduated just 30 last year, though it hopes to double that number in 2018. It will need to train them on three different platforms, a decision that puzzles some military attachés. Mr Attiyah defends the purchases. The F-15s are strike fighters, he notes, whereas the European jets are better suited to air-to-air combat.

But for Qatar and its neighbours, arms deals are also a way to shore up support in Western capitals. Bahrain is spending $3.8bn to about double its fleet of F-16s. The UAE signed a $1.6bn deal with Lockheed Martin, an American firm, to upgrade its air force. During his visit to Saudi Arabia last May, President Donald Trump announced arms deals with the kingdom worth $110bn. It was the largest such sale in American history—or, at least, it appeared to be. “It was a shopping list, but the Saudis haven’t actually signed contracts for most of it,” says an American diplomat.

Qatar has been most aggressive in pursuing this strategy. On June 9th Mr Trump called the emirate a sponsor of terrorism. Five days later his defence secretary signed off on the F-15 deal, undermining the president’s narrative. In October BAE Systems, a British firm, announced that it would lay off nearly 2,000 workers because of sluggish Typhoon sales. But the $6.7bn deal with Qatar, announced two months later, will help keep the production lines humming. The frenzied defence spending mirrors a flood of Qatari cash into Washington lobbying firms, which totals $4.7m since June. (In the five years before that, it spent only $6.5m on lobbying in America.)

A mitten-shaped peninsula that juts off Saudi Arabia’s eastern coast, Qatar has always felt insecure. In 1996, soon after the previous emir took power, dozens of ex-military officers were charged with plotting a coup. Qatar blamed Saudi Arabia and the UAE, though they denied involvement. Qatar’s fears were amplified in 2011 when other Gulf states deployed troops to Bahrain to quash a popular uprising. Qatar supported the move (and sent a small contingent of troops), but many people felt it set a troubling precedent.

Qatar’s best defence against outside aggression is al-Udeid, a sprawling airbase that is the forward headquarters of America’s Central Command. To please America’s airmen, Qatar is constructing 200 housing units for officers and their families, plus an entertainment complex. It also wants to build ports that could host American warships. Bahrain is currently home to America’s Fifth Fleet. That is unlikely to change, but the proposal underscores how important the American security umbrella is to Qatar.

The military build-up is already raising tensions in the Gulf. In January the UAE claimed that two Qatari fighter jets intercepted a civilian airliner. Bahraini state television aired a video that showed the radar tracks of all three aircraft. They were indeed close to each other. But the Qatari jets were flying on a perpendicular course to the Emirates plane, and 2,000 feet below it. With scores of new warplanes buzzing the skies over the Gulf, though, such run-ins may become more common.