Palestinians pray last week inside the al-Aqsa Mosque compound in Jerusalem’s Old City. (Mahmoud Illean/Associated Press)

“The market square is empty,” wrote Israeli songwriter Naomi Shemer in spring 1967, “and no one visits the Temple Mount.” The lyrics were part of her wildly mournful love song to a city, “Jerusalem of Gold.”

The open-air market she had in mind was in Jerusalem’s Old City, which is dominated by the holy site known to Jews as the Temple Mount and to Muslims as Haram al-Sharif. When Shemer wrote the song, Jerusalem was divided. For Israelis, the Old City was beyond barbed wire. By chance, the song was first performed about three weeks before the start of the Middle East crisis that led to Israel’s conquest of East Jerusalem. After the Six-Day War, Shemer wrote a new verse, in which the market was full. “Jerusalem of Gold” became Israel’s ballad of victory.

But there was a falsehood at its center: The Old City was not empty before the war. Palestinians lived there. Plenty of people had visited the Temple Mount. They were Muslim worshipers who came to al-Aqsa Mosque.

In the song, Palestinians were invisible. Israel’s postwar policy wasn’t much better. As Israel quickly annexed East Jerusalem and a swath of land around it, its leaders treated the Palestinian population, at best, as translucent: present and absent. East Jerusalem Arabs were given Israeli residency status but (with a few exceptions) not voting citizenship. Israel built neighborhoods for Jews; Arab neighborhoods were neglected and constricted.

Fifty years have passed. For the sake of everyone, Jewish and Arab, who lives in and loves this crazy city, Israeli policymakers should have overcome their self-deception. But the mistakes that Prime Minister Benjamin Netanyahu has made over the past two weeks in dealing with a crisis over the Temple Mount, and the mistakes he apparently has planned for the city, show that he’s still unwilling to see the city’s Palestinians.

The latest blowup began with a brutal terror attack at the Haram: Three Arabs from northern Israel shot and killed two Israeli policemen. In response, Netanyahu hastily ordered installation of metal detectors at the gates of the Mount used by Muslim worshipers.

This sounds sensible — if you know nothing about the Haram. When tens of thousands of worshipers need to enter within a short time for Friday prayers, it would be impossible to check everyone with metal detectors. As a security measure, the step was useless. But installing the devices turned the gates of the sanctuary into a visceral reminder of the Israeli checkpoints that make travel a misery and humiliation for Palestinians.

Worse, the decision was made without discussion with the Islamic trust that administers the site or with the Jordanian government, which by treaty is guaranteed a “special role … in Muslim Holy Shrines in Jerusalem.” Netanyahu acted as though the Mount was purely a piece of property under Israeli control, as if Muslims are mere guests there.  Predictably, the move touched a raw nerve for Palestinians, especially in Jerusalem.

In quickly organized protests, worshipers refused to enter the Haram. Instead, mass prayers were held on the streets outside. On the first Friday after the metal detectors were installed, clashes between police and protesters broke out in East Jerusalem. Israel’s relations with Jordan and with the Palestinian Authority unraveled.

Concerned most of all about right-wing political rivals, Netanyahu took longer than he should have to back down. A separate diplomatic crisis with Jordan gave him the pretext he needed. By last Friday, the metal detectors were gone. The city returned to a very uneasy calm.

In a better world, the messy affair should have made the prime minister open his eyes and see that Jerusalem is a Palestinian as well as an Israeli city, joined economically and still very divided politically, socially and religiously.

Instead, Netanyahu is backing two legislative initiatives designed to preserve the illusion of “eternally united Jerusalem” and to hide the city’s Palestinians. One is a change to the quasi-constitutional law on Jerusalem as Israel’s capital. The amendment would require a two-thirds majority in parliament to give up sovereignty over any part of today’s Jerusalem. Yet it would also allow redrawing the city limits to exclude a couple of Palestinian neighborhoods, which would get a separate local government under Israeli rule.

A second bill would extend the municipal limits to take in a number of large nearby West Bank settlements. On paper, the combined effect would be to make the Palestinian minority in Jerusalem smaller and the Jewish majority larger. The gerrymandering is a gimmick. On the ground, the same people will be living in the city as today.

There will still be a need for a political solution for Jerusalem and its holy places, as part of a two-state agreement. There will still be two cities, interlocked but distinct. It will still be essential for Israel’s leaders to snap out of the spell of a 50-year-old song and realize that neither the market nor the Mount were empty before we arrived.