Maybe US world leadership isn’t dead after all: Our government actually led from the front in the Middle East this week. Too bad it was the Federal Aviation Administration, awarding Hamas its first tangible war victory over Israel.

True, Secretary of State John Kerry is still in “leading from behind” mode, pushing an “immediate” Hamas-Israel ceasefire from behind Egypt, the United Nations, Qatar, Turkey, the Palestinian Authority and so on.

Rather than fully supporting America’s top Mideast ally in a war against fanatic jihadist terrorists, Kerry’s trying to strike a fair balance — consulting Israel and anti-Hamas Egypt one day, and Hamas’ top supporters, Qatar and Turkey, the next.

The problem is that a ceasefire is impossible at this point because Hamas is still desperately seeking a victorious photo-op ending for its so-far disastrous war, so it can dictate terms.

Since Hamas’ leaders live in posh Qatari hotels, they’ve got no problem crying, “Damn the dead Gazans, full speed ahead.”

But nobody expected the FAA to come to their aid.

On Tuesday, after a Hamas rocket got through Iron Dome to hit near Ben Gurion airport, the FAA stopped all US flights to and from Tel Aviv. European airlines followed suit, stranding summer travelers while EL Al and other Israeli carriers hopelessly try to pick up the slack.

On Wednesday, despite Israeli Prime Minister Benjamin Netanyahu pleas to Kerry, the FAA extended the ban for another day. It was lifted late Wednesday night.

Former Mayor Mike Bloomberg said these restrictions “hand Hamas an undeserved victory and should be lifted immediately.”

Bloomberg — what a mensch — bought an El Al ticket Tuesday night and flew to Tel Aviv to show that “Ben Gurion is the best protected airport in the world, and El Al flights have been regularly flying in and out of it safely.”

He could have added that the war there isn’t like the one in Ukraine, where an anti-aircraft missile downed Malaysia Airlines Flight 17 last week: If Hamas had such missiles, it would’ve used them against the Israeli Air Force jets that been bombing Gaza for two weeks.

Yes, that one rocket hit a house in Yahud, near Ben Gurion airport, Tuesday. But Iron Dome has managed to almost flawlessly protect Israel’s citizens and its strategic assets.

The odds of a rocket hit on the airport are lower than any other aviation hazard, Israeli Defense Force spokesman Peter Lerner assures me.

You can chalk up the FAA decision to excessive bureaucratic caution. But forgive reporters’ skepticism when Washington officials insist that the safety of Americans was the only consideration.

In an administration where the IRS persecutes the president’s critics, it’s not hard to imagine aviation bureaucrats sending a strong hint to Israel (“Wrap up your Gaza operation or else”).

From the start, Obama has stressed that Israel has a right to defend itself. But the dominate theme has already become “Israel must do more to protect civilians.”

Why? Kerry, so eager to return to the peace process that he’s so clumsily botched earlier this year, is back at it.

In Cairo and Israel, Kerry is competing with the UN Secretary General Ban Ki-moon for who could rack up more meetings and consult with more regional leaders.

And it’s no longer just a ceasefire they seek. Ban wants to fix “root causes,” while Kerry talks about “underlining issues.”

Yes, the European Union (and behind it the Obama administration and even Ban) have started to talk about what Israel sees as the root cause – Hamas’ arms. All are now making vague references to disarming Gaza.

But America and the rest mostly hint that, after the ceasefire, Gaza’s borders will open up for humanitarian goods. (And never mind that, in practice, the goods will also include Kalashnikovs and long-range rockets.)

They’re dangling promises of cash for Gaza, too — pouring money through the UN Relief and Works Agency.

Hmm. UNRWA was shocked this week to discover rockets in one of its Gaza schools (for the second time) — so shocked that it gave them right back to Hamas.

So why should Kerry hand UNRWA a large chunk of the $47 million of American aid he’s pledging for Gaza rehabilitation? Why can’t our own US Agency for International Development handle the funds?

Because this administration’s worldview revolves around the “international community.”

Oops, that’s the same community whose UN Human Rights Council on Tuesday (predictably) launched an investigation into Israel’s “war crimes” in Gaza, ignoring (of course) Hamas’ firing of missiles at civilians.

Kerry also follows the UN obsession with Israeli “transgressions”: More Arabs were killed last weekend in Syria than in the two-week Gaza war, yet he dropped all other world issues to go to Cairo and Tel Aviv.

America became the envy of the world, and its moral leader, by knowing the difference between the Israels and the Hamases.

No more: Now we carelessly (if unintentionally) reward the bad guys while harming the good guys.