It was supposed to be a public relations bonanza. A pair of new F-35 fighter jets were scheduled to streak across the sunny desert sky here on Monday afternoon and land to rapturous applause by Israeli and American leaders and military brass.

But first, fog socked in an Italian air force base outside Milan, delaying for hours the takeoff of the F-35s on the last leg of their journey from Texas to Israel.

Tired of the long wait, many of the guests departed, a reverse parade of military attaches heading back to their embassies, followed by television news crews who didn’t think footage of airplanes landing in the dark would be terribly gripping.

Then, out of nowhere, ­President-elect Donald Trump decided to strafe the F-35 in a tweet.

“The F-35 program and cost is out of control,” Trump wrote Monday. “Billions of dollars can and will be saved on military (and other) purchases after January 20th,” the date of his inauguration.

Trump didn’t mention any defense companies by name, but share prices of the lead F-35 contractor, Lockheed Martin, closed 2.47 percent lower Monday.

Finally, the two F-35s landed here at 8:16 p.m. It was dark.