BOEING’S factory at Everett, near Seattle, is the largest building in the world, as befits the world’s biggest planemaker. From within its cavernous halls a new passenger jet emerges every working day. After an empty fuselage enters at one end of the factory, it can take as little as a month for some models to emerge as a working aircraft at the other end. Still, Boeing’s lead in the field of commercial airliners, which looked almost unassailable a decade ago, is under threat from Airbus. Since 2012 the European firm has won more orders than Boeing, and may eventually outpace it in annual deliveries. For Boeing, which celebrates its centenary this year, staying ahead of a competitor which has been in business for less than half that time is a matter of pride as much as it is a commercial imperative.

One option under consideration at Boeing is to build a new plane for the “middle of the market”, to replace its ageing 757. An aircraft that would carry between 220 and 280 passengers on routes up to 5,000 miles would plug a gap in its fleet, between short-haul narrow-body jets and wide-bodied planes for long-haul travel. But Boeing should be wary of the risks involved. Airbus has outclimbed its American counterpart largely because Boeing made such a mess of developing another new plane, the 787 Dreamliner, a long-haul jet that entered service in 2011.

The Dreamliner programme, announced in 2003, was supposed to cost $6 billion and see the plane take to the air in 2008. The final bill was closer to $32 billion; and the 787 arrived three years late, the result of a combination of technical failures and supply-chain snafus. With engineers, designers and other resources diverted into getting the Dreamliner aloft, plans for the rest of its fleet were delayed.

That gave Airbus an opportunity to take a lead in narrow-bodied jets. Boeing’s 737 and Airbus’s A320 family of planes typically carry 120-200 passengers on shorter hops of up to 3,000 miles. These planes are the biggest sellers at both firms. Two-thirds of the planes delivered by Boeing last year and nearly four-fifths of Airbus’s were narrow-bodies.

In 2010 Airbus took Boeing by surprise with the announcement that it would update its A320 with new engines and tweaks to its design, making it 20% more fuel-efficient than previous models. Preoccupied with the 787, Boeing was slow to respond with its own revamp, the 737MAX. Airbus now has 4,515 orders for its family of A320neo planes, the first of which entered service this year. Boeing has just over 3,000 orders for its new plane, the 737MAX, which is not destined for first delivery until next year.

Boeing’s troubles with the 787 also helped Airbus in the market for wide-bodied jets. Boeing remains ahead of Airbus, with 1,357 orders for its fleet compared with 1,267 for Airbus’s range. Although the pair sell far fewer of them, wide-bodied planes bring handsome rewards. Some 80% of Boeing’s revenues came from wide-bodies in 2014, though they account for just a third of production by number of planes. The delays and cost overruns of the Dreamliner programme mean that, although it is selling well, it is not profitable and a write-down is likely. There have been knock-on effects: a new variant of Boeing’s 777, the 777X, is not due until 2020, giving Airbus’s A350 time to win orders.

Analysts think Boeing’s engineers have enough to do until 2020 revamping the 737 and 777 successfully, without other distractions, says Jason Gursky of Citi, a bank. And the damage inflicted by the 787 will make Boeing think twice about designing a new plane to sit between its long- and short-haul models. Airbus’s experience with the A380 superjumbo, developed at huge expense but not yet with enough orders to justify its existence, offers another warning. It is also unclear that the market will be big enough to justify a new plane: some airlines are already ordering long-range versions of Airbus’s A321neo or smaller versions of the A330 to plug the gap. (Putting a new engine on the plane, a much less risky option, is impossible with the 757, because the airframe is too old to accommodate new fuel-efficient engines.)

Cutting aside

Other routes to boosting Boeing’s market share lie open. Cost reduction is one. Airbus out-competes Boeing by using a fifth fewer employees to build each plane. So Boeing is slimming. In March the firm said it would cut the workforce in its commercial-jet division by 10%—a loss of 8,000 jobs—and investors are demanding more. Machines are replacing manpower: robots rather than humans now rivet together and seal the wings for the 737 and 777.

Changing working practices will improve productivity too, says Walter Odisho, Boeing’s vice-president for manufacturing. Moving production lines of the sort seen in car factories are being rolled out by the planemaker in Seattle. And to save time workers spend walking round the factory floor, employees are being given hand-held computers and automated trollies, so they can communicate with their managers and get the tools they need without stepping off the production line.

The planemaker says that it is unlikely for several years to take a firm decision on whether to proceed with a new plane. But Boeing has two overriding instincts: developing new planes and beating Airbus. It will need to resist the first for a while in order to do the second.

Correction: The number of orders for Airbus's A320neo family of planes has been corrected in this article to 4,515 since publication.