First it left the Queen of England hanging. Then it missed the Royal International Air Tattoo. But officials were still optimistic that the F-35 Lightning II would be ready in time for the crescendo of its United Kingdom tour: this week’s Farnborough International Airshow.

Even as late as Tuesday morning, the Pentagon said it “remained hopeful” that the Joint Strike Fighter would make what was supposed to be its international debut at one of the world’s largest aerospace showcases. But hours later, it announced that the F-35 would be a no-show.

Its absence is an embarrassment for a program that has a long and complicated past, checkered with cost overruns and delays. The latest problem began on June 23, when the engine of an F-35A, the Air Force’s variant of the plane, caught fire while preparing to take off at Eglin Air Force Base in Florida.

No one was injured. But the fleet was grounded as investigators worked to determine what caused the engine to catch fire.

While grounded, the F-35 missed the christening of the HMS Queen Elizabeth aircraft carrier at which it was expected, though never officially confirmed, to perform a flyover. The queen, however, was there, and christened her namesake with a bottle of whiskey.

The announcement that the F-35 would not appear at Farnborough came hours after the Defense Department said Tuesday the fleet could fly again under restrictions. That revived hopes that the Joint Strike Fighter would appear at the air show.

But at an afternoon news conference, a Pentagon spokesman, Rear Adm. John Kirby, said the F-35B, the Marine Corps variant of the fighter jet, would not make it overseas after all.

“While we are disappointed, we remain fully committed to the program and look forward to future opportunities to showcase its capabilities to allies and partners,” he said. “We fully expect to work our way through this problem and restore the full operational capability in the near future.”

He said that “safety — as always — remains our top priority.”

Richard Aboulafia, an aerospace analyst at the Virginia-based Teal Group Corp., said that being a no-show was a “black eye, not a knife wound.”

“Nobody’s going to be making major strategic decisions, like a fighter buy, on the basis of an air-show appearance,” he said. “But the F-35 has its opponents, and you don’t want to give them any more ammo than they’ve already got.”

On Monday, Rep. James P. Moran (D-Va.), a senior member of the Appropriations subcommittee on defense, wrote to Pentagon officials, saying: “This most recent episode is only the latest in a series of highly disturbing developments, one that poses a grave risk to the personnel operating the aircraft and that should raise serious concerns about the viability of the program.”

In the news briefing, Kirby said that he did not forsee any disruptions in sales as a result of the problem, saying it “is not uncommon for new aircraft, new airframes, new capabilities, to have technological issues like this.”

The air show was seen as an important showcase for the F-35, which is being marketed overseas in an effort to bring down costs.

While the fleet was returned to flight status Tuesday morning, the Pentagon imposed restrictions that “will remain in effect until the root cause of the June 23 engine mishap is identified and corrected,” Kirby said in a statement early Tuesday.

The F-35, the Defense Department’s most expensive weapons program, is manufactured by Bethesda-based Lockheed Martin.

“While we were looking forward to the F-35 demonstration at Farnborough, we understand and support” the decision, the company said in a statement.