On July 14, for the first time in decades, Israel closed the Temple Mount, a site holy to Jews, Muslims, and Christians, on a Friday-Islam's holy day. The move was made after three Arab Israelis opened fire at the site, killing two Israeli policemen.
The Muslim terrorists, Israeli citizens who had used automatic weapons that they apparently carried in a knapsack to the Temple Mount and hid at the holy site prior to the attack, were tracked down and killed by Israeli police.
By Sunday, July 16, the Temple Mount had reopened, with temporary metal detectors and cameras in place to screen worshipers.
While Israelis initially considered the installation of magnometers and cameras a non-controversial step aimed at boosting security for all who pray at the site, others -- Palestinian, Jordanian, and Muslim -- condemned what they called Israel's effort to change the site's political status and consolidate control.
The ensuing protests have left six dead in Israel --- three Palestinian protesters and three Israeli settlers who were stabbed to death in their homes.
On Monday evening, Israelis and Arab officials edged closer to a deal to resolve the crisis.
The recent spate of violence is a grim reminder of age-old tensions --- and yet, in Israel, an increasingly rare one. In a region beset by war and political turmoil, Israel-and its capital-have remained relatively calm. That's thanks in part to radical changes in counterterrorism policing led by Major General Yoram Halevy, 54, commander of the Israeli Police's Jerusalem district.
One of the force's most experienced officers, Halevy has for the past 17 months overseen the police's counterterrorism mission in Jerusalem, including the roughly 5,000 members of the Israeli Police and Border Police operating in the city.
In an interview only days before the Temple Mount attack, he discussed some of his reforms publicly for the first time and explained why he thinks they are reducing both violence and civilian tolerance of it.
The numbers are impressive.
In 2015, there were 33 stabbings in the city; this year, until the latest violence, there have been just six. In 2015, Jerusalem reported six deaths due to deliberate car-rammings; this year, one person has died in such incidents. While 43 terrorist attacks occurred in the city in 2015, only eight so far have taken place in 2017. Within the past year, stone-throwing incidents have dropped by 15 percent. Despite the Temple Mount attack, "these are dramatic reductions," Halevy said.
Such a record under the most challenging of circumstances holds potentially valuable lessons for other cities targeted by terror.
"Anyone can chase down and arrest terrorists. That's the easy part," said Halevy, the Jerusalem-born son of Iraqi Jews who speaks fluent Arabic and worked undercover for the police in the Palestinian community for several years. "Denying terrorists the civilian support they crave and need to operate is a far tougher challenge."
The most effective way of defusing Palestinian hatred of the Israelis who, in their view, occupy their capital and country is to "empower the silent civilian majority which is sick and tired of the violence, but afraid to say so." This, Halevy told me through a translator, though he speaks some English, is his overarching goal.
Few cities are as tempting a terrorist target as Jerusalem. Fought over for centuries, destroyed at least twice, besieged some 23 times, and recaptured 44 times, Jerusalem is the heart of the modern struggle between two peoples who claim the same land.
The city remains demographically divided between Israelis concentrated in the west and Palestinians in the east. But it has not been physically split since the 1967 war, when Israel wrested control of east Jerusalem from Jordan, which still helps administer sensitive holy sites like the Temple Mount.
As such, Jerusalem has been the scene of persistent protests, strikes, and terrorist attacks-even as 10 million tourists visit each year.
General Halevy's daunting task is to protect everyone, especially the 1 million people who inhabit the Old City, the far larger modern metropolis, the surrounding suburbs, and the roughly two dozen West Bank villages that Israel incorporated after the '67 war.
Roughly a third of its residents are ultra-Orthodox-in Hebrew, the "Haredi," or "those who fear G0D"-a third are Palestinian Muslims, and a third Christian, secular, or "other."
Halevy met me in his office, which adjoins the Western Wall, the symbol of the Jews' eternal presence in this disputed land and a site of Jewish pilgrimage and prayer. Tapping the wall near his desk, he said that the Jews' most sacred stones were just beneath the plaster.
From his window, he can see those who come from around the world to pray and tuck notes between gaps in the thick slabs of ancient limestone. On the other side of the historic religious dividing line are the tens of thousands of Muslims who pray at the Temple Mount each Friday --- numbers that swell to as many as 240,000 during Ramadan.
"There are extremists on both sides of this wall," Halevy said, referring to the Jewish zealot who killed former Israeli prime minister Yitzhak Rabin and threaten Palestinians, and Hamas and other militant Islamist groups that target Israelis. "But the law applies to all equally," he said.
The fraught history of Israeli-Arab wars make relations with the Palestinians particularly problematic for the overwhelmingly Jewish police force, of course. Halevy faces an uphill battle to instill his equality ethos in the overwhelmingly Jewish force.
In the past, when Palestinians attacked Israelis, he said, Israeli police considered the suspects "enemies," even after they had been investigated and cleared of wrongdoing.
Interrogations were often gratuitous exercises in humiliation. "Fathers were interrogated and berated in front of sons; sons in front of fathers," he said. Suspects were shamed, whether deliberately or inadvertently, in a culture that often values honor over the rule of law.
Through police retraining, Halevy says that he has worked to end what he calls this "system of humiliation." Police are now taught how to interrogate suspects to minimize dishonor. After individuals are cleared, they are told why they fell under suspicion. If appropriate, an apology is extended. And in what Halevy called "phase two" of an interrogation, officers then ask, "how can I help you?'"
Officers under Halevy's command make a point of getting to know the community. In the past, too many Jerusalemites, especially Palestinians, never encountered the police until after a protest or a stone-throwing or other attack.
As a result, he said, such encounters often produced hostility, though Palestinian merchants, government workers, and other civilians have the most to lose when violence triggers closures.
Now, he said, thanks partly to changes in policing, "people are increasingly speaking out against the violence and signaling a lack of support for such attacks."
For instance, after Hadas Malka, a 23-year-old sergeant major in the Border Police, was fatally stabbed near Damascus Gate before the final week of Ramadan in June, city residents remained calm.
Though police and military special forces were deployed to prevent further attacks, he said, "there were no riots or protests in the city. Nor were there celebrations or glorification of the three Palestinians who killed her and were then killed themselves. It was the quietest Ramadan on record in Jerusalem."
Another innovation is his decision to embed police stations in community centers that issue permits, identity cards, and drivers' licenses and provide fire, ambulance, and other essential services to underserved Palestinians.
General Halevy has already opened his first "combined civilian service center" in Shu'fat refugee camp on the border between Jerusalem and the West Bank, a traditionally troubled area for Israeli law enforcement. He plans to open three or four more centers within the coming year, if the government allocates sufficient resources.
Many Palestinians who would never approach a police station might seek help from community center-based police, he argues.
"Last week a woman was hysterical because her son was missing," he said. Police at the center drove her around the neighborhood for hours until they located him. Over time, Halevy hopes, embedding police in such centers will help reduce Palestinian hostility toward them.
Gilad Erdan, Israel's Minister of Public Security and Strategic Affairs, said in an interview that Prime Minister Benjamin Netanyahu's government supports such initiatives and hopes to invest 2 billion shekels in the next few years to bolster police services not only in Jerusalem but also in Israeli Arab areas.
"If we want people to respect the law, we must ensure that they have equal access to police and other government services," he said. Previous government pledges to provide such help have produced little, however.
Another change that Halevy has implemented: shifting the location of Israeli security checks for West Bank Palestinians who travel to Jerusalem to pray. While Palestinian residents of greater Jerusalem with blue-colored Israeli identity cards are not citizens, they can travel freely throughout Jerusalem, indeed, throughout Israel.
By contrast, Palestinians from the West Bank without such cards must often navigate grueling security checks and humiliating car-and-body searches to enter the city.
At the request of the Israeli Defense Forces this Ramadan, the police, working with the Palestinian Authority in the West Bank, began conducting security checks in Ramallah and Bethlehem and then transporting Palestinians to Jerusalem by bus.
"Because the checks were performed inside their own towns and villages, they didn't undergo a security ordeal at the entrance to the city," Halevy explained. "They went straight from those West Bank towns to the Temple Mount, arriving without agitation, frustration, or humiliation." None of the perpetrators of Sergeant Malka's killing or the Temple Mount attack, he noted, had entered Jerusalem on a prayer bus.
If Palestinian residents of the city are now treated with greater respect, they also know that their community will pay a heavy price for terrorism or violence.
"Whenever stones or fire-bombs are thrown at Israeli forces, traffic on that street is stopped and shops are closed. Merchants and homeowners near the incident are questioned. People in that neighborhood know they have a lot to lose," Halevy said.
After Malka's murder, for instance, Israel cancelled all permits for Palestinian family visits in Jerusalem for the rest of Ramadan -- a decision affecting between 100,000 and 300,000 people -- in addition to Israel's usual practice of prohibiting males age 12 to 40 from visiting the Temple Mount during that month. This week, in response to the violent protests, Israel barred men under 50 from entering the site.
Punishment for terrorism can be particularly severe for terrorists' families. In addition to sealing or destroying family homes, the police now bring the full force of Israeli law to bear against members of the terrorists' "hamula," or extended family, who celebrate the murder of Israelis or contemplate revenge attacks for the loss of their own.
"We think that collective punishment does not stop terror," Halevy said. "But if, after monitoring family members, we conclude that some relatives are determined to incite more violence or plot revenge, we delay their permits to open a business, or insure homes or property. We fine them and their property for minor infractions of rules and take other legal steps to let the community know that inciting or committing violence will be punished."
What Israeli police are not permitted to do is confiscate a suspect's Israeli identity card. "That would be an effective deterrent," Halevy allowed, "but it is not legal."
The goal of such retribution, he said, is predictability. "We want the community to know that the police will protect them when needed, and punish them when warranted." Consistency, he added, "leads to public trust in the system."
Minister Erdan agrees. His monthly incident figures, which include the neighboring West Bank, reflect a similar drop. While there were 38 attacks per month (not counting stone throwing and other less serious incidents) in what Israel calls Judea and Samaria in the fiscal year ending Sept 30, 2016, there have been ten per month this year-a 73 percent reduction, he said. "Through these and other measures, we've succeeded in reducing the level of attacks, particularly by lone wolves," the minister said.
To supplement Halevy's efforts, the government plans to operate more surveillance cameras on roads and at sensitive sites in Jerusalem and other cities. To help track stolen cars, which terrorists often use in attacks, officials want to install some 500 cameras that read license plates on highways and main roads.
And to help detect suspicious activity in public places, Israel has begun installing expensive new "facial recognition cameras" --- some at Damascus Gate, for instance, where Malka was killed.
In addition, the police have doubled the ranks of Muslim officers in the past year from 2 percent to 4 percent. Since Muslims comprise about 17 percent of Israel's population, Erdan calls the underrepresentation of Muslims in the force a "historic mistake" that he plans to correct.
To be effective, he said, a police force "must include people from all kinds of communities in your cities."
Palestinian officials aren't impressed by such changes. Violent incidents may be down, said Elias Zananiri, a policy adviser and media consultant in East Jerusalem for the Palestinian government and private institutions, but tension on the ground is rising.
"We are partners with Israel in combatting terrorism, which threatens us all," Zananiri said. "But we're losing ground because there are ultimately no military solutions to terror. Those of us who still favor the Palestinian-Israeli peace process and a two-state solution are increasingly seen as foolish or naive," he said. "Terrorism and violence are side effects of the disease, which is the absence of hope for a peaceful political solution."
His warning was borne out last Monday, when Palestinian protesters hurled bottles and rocks at police in Jerusalem and the West Bank and demonstrations against Israel's new security measures were held in several Arab capitals.
On Sunday in Jordan, an Israeli security guard at Israel's embassy in Amman shot and killed two Jordanians who had entered the compound.
On Monday, after a day of intense negotiations between Israeli and Jordanian officials, Jordan agreed to permit the Israeli guard, who was also wounded in the attack, to return to Israel. Late Monday, Israel's Channel 2 news reported that Israel had agreed to remove the metal detectors on the Temple Mount.
Halevy said he is focused not on politics but on fighting terror through effective policing. He plans more changes.
Counterterrorism, particularly in an Internet age, would most likely be "a generation's work," he added, particularly in Jerusalem. "In no other city can you cross a national border on foot in ten minutes," he said.
As we left his office, his eyes silently inspected a group of young police and Border Patrol members donning flak jackets and loading their weapons to prepare for patrol duty.
Protecting Jerusalem, he sighed, was a heavy responsibility. To remind the police of that duty, a Hebrew banner hangs in their assembly hall. "Generations have dreamed of coming to Jerusalem," it stated. "We have the honor of protecting it."
• 02/21/17: Who's Behind the Leaks?
• 01/10/17: The Road to Fort Lauderdale: Like many self-radicalized 'lone wolves,' the perpetrator of last week's attack was on law enforcement's radar