WASHINGTON  The Joint Strike Fighter was supposed to be the program that broke the mold, proof that the Pentagon could build something affordable, dependable and without much drama.

But rather than being the Chevrolet of the skies, as it was once billed, the fighter plane, also called the F-35, has turned into the Pentagon’s biggest budget-buster. And with worries growing that the rise in costs could overwhelm other programs, Defense Secretary Robert M. Gates fired the general in charge this week and said he would withhold $614 million in fees from the prime contractor, Lockheed Martin.

The decision was an embarrassment for Lockheed Martin, the nation’s largest military contractor, which could eventually draw at least a quarter of its sales from the F-35. But Pentagon officials said they wanted to make sure they avoided the kind of death spiral that had caused so many other weapons programs to collapse.

The Air Force, the Navy and the Marines are planning to buy more than 2,400 of the planes. But any delays could force them to spend billions of dollars on less advanced fighters to avoid a shortfall. That, in turn, would reduce their orders for the F-35, driving up the price for each plane and forcing them to cut orders further.