As casualties mount and calls for a ceasefire grow, the war in Gaza is probably close to quitting time. But nobody should be foolish enough to think that silencing the guns will mean a return to the pre-war status quo.

For Israel, a business-as-usual approach is no longer possible. The barrage of Hamas rockets cannot be tolerated again because the weapons’ increased range puts the entire population in harm’s way.

But something else also happened in the last two weeks, and the shock waves are just starting to roll through Israeli society. The discovery of Hamas’ vast tunnel system, which would have allowed thousands of terrorists to cross under the border and emerge inside the Jewish state to carry out surprise attacks, was a wake-up call that is certain to lead to a harder national line against the Palestinians.

Prime Minister Benjamin Netanyahu already declared that the threat caused by the tunnels means Israel cannot accept a fully sovereign Palestinian state in the West Bank.

“If we were to pull out of Judea and Samaria, like they tell us to,” he said in a speech four days after the war began, “there’d be a possibility of thousands of tunnels” being dug to attack Israel.

Noting that the West Bank is 20 times the size of Gaza, he said his country would never “create ­another 20 Gazas.”

Veteran Israeli journalist David Horovitz, writing in the Times of Israel, said the speech “spells the end” of any notion that the prime minister would ever agree to the kind of free Palestinian state that President Obama and most of Europe, along with the Palestinians, demand.

“This is not merely demanding a demilitarized Palestine,” Horovitz wrote of the speech. “It is insisting upon ongoing Israeli security oversight inside and at the borders of the West Bank.”

A widely discussed corollary is that Israel might not pull completely out of Gaza, as it did in 2005 and after subsequent invasions. What it will do isn’t clear, but it is determined not to allow Hamas to ­replenish its weapons stockpile and provoke another war.

Coming as Islamic radicals gain strength and territory in Syria, Iraq and large parts of North Africa, the revelation that Israel was close to a catastrophe has been deeply unsettling. The prospect of an underground invasion causing mass casualties was not taken seriously before.

It would be too much to credit Hamas with a strategy of using rocket fire as a diversion from its aim of massing underground, but, in truth, Israelis were better prepared to shoot down rockets in the sky than to expect Hamas fighters to emerge from beneath their feet. Military leaders openly concede they did not appreciate how many tunnels there were — scores have been found — and how extensively they penetrated into Israel.

Indeed, it was only after a successful attack from a shaft that Netanyahu ordered the ground invasion. Much of the work of Israeli soldiers in Gaza, and most of their casualties, have been linked to locating, searching and destroying the underground network.

These were no simple holes in the ground. Most had entrances hidden in Gaza buildings and were up to 90 feet deep, while some ran for more than a mile under the border. Some had electricity and telephones and storage areas for weapons and supplies. The largest were, effectively, forward terrorist bases inside Israel.

It is not lost on Israelis that the tunnels were reinforced with steel and concrete. The supposed shortage of building materials in Gaza, routinely denounced as cruel by ­Israel’s critics, did not stop Hamas from diverting tens of thousands of tons into preparation for war.

That material could have been used to build houses, hospitals or schools. The tunnels even could have served as bomb shelters to protect Gaza’s civilians from Israeli bombs.

Instead, a determination to kill Jews took precedence over every ­aspect of life in Gaza. That included Hamas leaders urging and sometimes forcing civilians to stay in the line of fire, turning them into human shields to protect rockets and ­ammunition dumps. Nothing better illustrates the Hamas culture of ­hatred and death.

And now that nihilism, endorsed by Gazans who elected Hamas as their government, has destroyed any chance of a sovereign Palestinian state in the near future.

Naturally, much of the world will use a new Israeli hard line to accuse it of genocide and apartheid, blah blah blah. But the facts are clear: Once again, the Palestinians have only themselves to blame.

New York’s pension time bomb is ticking

Detroit’s sinking ship and New Jersey’s pension problems are getting lots of attention. But Steve Malanga, writing in the City Journal, makes a compelling case that New York state is also playing the funny-money game.

Citing data from the state comptroller, Malanga reveals that in the last year, 139 towns and cities deferred $472 million in scheduled pension-fund payments, “while the state government skipped another $937 million.” In the three years since Albany approved the deferral program, governments withheld a total of $3.3 billion, he says.

Because the payments must be made eventually, deferral is a form of paying tomorrow for a hamburger today. At some point, taxpayers and pensioners are going to wonder where the beef went.

Houses of cards

Lefties are starting to demand that Gotham provide housing for some of the illegal-immigrant children coming across the Mexican border. No doubt Mayor Bill de Blasio will join the chorus as soon as he gets over his jet lag.

Lest his comrades think Dollar Bill moved uptown because he vacationed in Italy and will soon bunk in swanky Gracie Mansion, here is how he can re-establish his progressive bona fides: Lead by example.

The mayor owns two houses in Brooklyn, and if he wants New York to house Central American immigrants, he should put his apartments at the top of the available list. Only then should he demand that taxpayers chip in, too.

Pedaling ahead on 2 flat tires

A report that Citi Bike aims to solve its financial problems by expanding and raising prices is a head-scratcher. The owners are losing money on the $95 annual memberships, in part because not enough people signed up.

Yet the Wall Street Journal says new investors want to double the number of bikes, to 12,000, and that membership fees could hit $140.

Let me get this straight: There’s not much demand for the product, so the solution is to increase the supply and raise the price. Is that what they teach in business school these days?

The 39% delusion

There is no surprise in the poll showing President Obama with a mere 39 percent approval rating, against 54 percent disapproval. Given the mess at home and the chaos abroad, the curiosity is that 39 percent still think he’s doing a good job.

The only way to approve of his performance is to buy the baloney that nothing is his fault. Either that, or all those people got free Obama Phones!