The news was familiar but no less alarming for the ugly déjà vu: four Israelis killed on Wednesday night by Palestinian gunmen in the heart of Tel Aviv. Israel’s government, the most right-wing in the country’s history, responded with measures that the UN promptly warned might count as collective punishment: flooding the West Bank with troops, sealing off the West Bank and Gaza, and revoking entry permits that had allowed 83,000 Palestinians to cross into Israel for work, worship and medical care.

On Thursday, the day after the shootings, Tel Aviv’s Mayor Ron Huldai found the courage to state the obvious — that violence will persist until the occupation ends. Israel “is perhaps the only country in the world holding another nation under occupation without civil rights,” Huldai said. Such frankness counts as bravery these days, but even Huldai was understating the truth. It’s not the mere fact of a military occupation, of Israeli troops on Palestinian territory, that provokes such attacks. It can be difficult to comprehend from across the Atlantic, or even from usually tranquil Tel Aviv, but the occupation, as I have observed while reporting from the West Bank since 2011, functions as a massive mechanism for the creation of uncertainty, dispossession and systematic humiliation. It is not just soldiers and guns, but a far-reaching structure that affects all aspects of Palestinian life — a complex web of checkpoints, travel restrictions, permits, walls and fences, courts and prisons, endless constraints on economic possibilities, home demolitions, land appropriations, expropriation of natural resources, and, too often, lethal force.

No amount of preventive repression or collective punishment will bring an end to the bloodletting in Tel Aviv or elsewhere. As long as this oppressive system stands, and the United States continues to support it with billions of dollars a year in military aid, despair will spread, and with it death.

A conversation I had two summers ago with a former Israeli soldier named Eran Efrati opened one small window onto how the occupation works. We met in Jerusalem at the beginning of a war on Gaza that would leave more than 2,000 Palestinians dead. Efrati had long since left the army and become an anti-occupation activist, but he spent most of 2006 and 2007 stationed in the southern West Bank city of Hebron. He was 19 when he arrived there and at the time saw little reason to question the Israeli military’s presence in the city. At his first briefing, he recalled an officer asking the troops what they would do if they saw a Palestinian running at a settler with a knife.

Efrati’s first task as a soldier in Hebron was to throw stun grenades into an elementary school to announce the beginning of the curfew.

“Of course the answer was you shoot him in the center of his body,” Efrati said. The officer posed the question in reverse: What if it was the settler with a knife? “And the answer was you cannot do anything. The best you can do is call the police, but you’re not allowed to touch them. From day one the command was, ‘You cannot touch the settlers.’” This made sense to him, Efrati said. Palestinians were the enemy. The settlers seemed a little crazy, but they were Jews.

A few days later, thousands of settlers arrived from all over the West Bank to celebrate a religious holiday. The army imposed a curfew to keep Palestinians off the streets. Efrati’s first task as a soldier in Hebron was to throw stun grenades into an elementary school to announce the beginning of the curfew. “I just did it, like everyone else,” he said, “and within seconds, hundreds of kids ran outside. I was standing at the entrance and a lot of them looked at me in the eyes — that was the first time that it hit me. All of a sudden I understood what I was doing. I understood what I looked like.”

That weekend, Efrati recalled, settlers filled the central city. He was assigned to escort a group of them into the Patriarchs’ Tomb, a site holy to both Islam and Judaism, where Abraham, Isaac, and Jacob and their wives Sarah, Rebecca, and Leah are believed to be buried. The settlers were allowed into the Palestinian side of the site, into the mosque. What he saw there shocked him: Israeli children were peeing on the floors and burning the carpets. Their parents were there — the mosque was packed with settlers — but no one was stopping them. He and another soldier grabbed one of the children and took a cigarette lighter from his hand. “He started screaming at us,” Efrati said. “We laughed at him.” Five minutes later, “one of our very, very high-ranking officers came inside the mosque and said, ‘Did you steal something from the kid?’” They tried to explain, but the officer only repeated the question. “We said yes.” The officer ordered them to give it back and apologize. They found the child, apologized and returned the lighter. The boy ran right into the next room, Efrati said, and resumed setting fire to the carpets.

Things got weirder. Efrati was put in charge of a checkpoint separating the area of Hebron inhabited by settlers from the larger Palestinian city. He described it as grueling, mind-numbing work, standing in the cold for as long as 16 hours, usually hungry and always sleep-deprived. Inflicting humiliation was part of the assignment. Schoolteachers would cross dressed in suits and ties. The soldiers would make them strip in front of their students. “Sometimes we would make them wait for hours in their underwear,” Efrati said.

The pretext was to check them for weapons. “Nobody thought that anything would happen to them,” he said, but the troops were told again and again by their officers that all Palestinians were potential threats, that anyone might stab them if they dropped their guard for a moment. That notion, Efrati said, “made us very, very aggressive. So you would push them against the wall, undress them, take your weapon and hit them a few times.

“If he’s saying something, hit him. If he turns around, hit him. Just make sure that you’re completely in control.”

His conscience began to nag at him. He started bringing bags of Bamba — a popular Israeli snack food, like Cheez Doodles, only peanut flavored and not phosphorescent orange — to the checkpoint and offering them to children. After a few days, “the first brave kid came up, grabbed a bag of Bamba and ran away.” Efrati was thrilled. Not long after, a Palestinian boy of about eight years old asked him for a treat. This boy didn’t run.

He opened the bag, and offered some to Efrati. They sat and ate the chips together. When the boy walked off, Efrati felt ecstatic. He could finally be the man he wanted to be, a soldier who was loved for his kindness and who at the same time, as he put it, “was protecting my country from a second Holocaust.”

When he got back to the base that night, he was ordered to eat quickly and prepare for another shift, not at the checkpoint but on a “mapping” expedition into the section of the city governed by the Palestinian Authority. He was still so high from his success with the Bamba that he didn’t mind the extra work. The routine was simple: “You go into houses in the middle of the night, get everybody outside, take a photo of the family, and start going around the house, destroying things.” The idea was to search for weapons, “but we also needed to send a message,” Efrati said, to make sure the residents never lost “the feeling of being chased.” (It’s awkward in English, but it’s a single word in Hebrew. His officers used it a lot, Efrati said.) His job was to draft maps of each house, charting the rooms, the doors and the windows. “If at some point there was a terror attack from that specific house,” the army would be ready.

That night, they searched, trashed and mapped two houses in the neighborhood of Abu Sneineh. It was snowy and cold. When they were done, the sun had not yet risen, so their officer chose one more house, apparently at random. They forced the family outside and into the snow and went in and started searching. Efrati opened the door to a child’s room — he remembered seeing a painting of Winnie-the-Pooh on one wall—and had begun sketching when he realized that there was someone in the bed. A young boy leaped out from under the covers. He was naked. Startled, Efrati raised his gun, aiming at the child. It was the kid from the checkpoint that afternoon. “He started peeing himself,” Efrati said, “and we were just shaking, both of us, we were just standing there shaking and we didn’t say a word.” The boy’s father, coming down the stairs with an officer, saw Efrati pointing a rifle at his son and raced into the room. “But instead of pushing me back,” Efrati said, “he starts slapping his kid on the floor. He’s slapping him in front of me and he’s looking at me saying, ‘Please, please don’t take my child. Whatever he did, we’ll punish him.’”

In the end, the officer decided that the man’s behavior was suspicious, that “he was hiding something.” He ordered Efrati to arrest him. “So we took the father, blindfolded him, cuffed his hands behind his back and put him in a military jeep.” They dumped him like that at the entrance to the base. “He stayed there for three days in a very torn-up shirt and boxer shorts. He just sat there in the snow.” Eventually, Efrati summoned the courage to ask his officer what would happen to the boy’s father. “He didn’t even know what I was talking about,” Efrati said. “He was like, ‘Which father?’” Efrati reminded him. “You can release him,” the officer said. “He learned his lesson.”

After cutting the plastic ties that bound the man’s wrists, untying the blindfold and watching him run off barefoot in his underwear through the streets, Efrati realized that he had never given his commander the maps he had drawn. He hurried back to the officer’s room. “I really fucked up,” he told him, apologizing for his negligence.

The officer wasn’t angry. “It’s okay,” he said. “You can throw them away.”

Efrati was confused. He protested: wasn’t mapping a vital task that might save other soldiers’ lives?

The officer got annoyed. “He says, ‘Come on, Efrati. Stop bitching. Go away.’” But Efrati kept arguing. He didn’t understand.

When it became apparent that he wasn’t going anywhere, the officer told him: “We’ve been doing mappings every night, three or four houses a night, for forty years.” He personally had searched and mapped the house in question twice before with other units.

Efrati was even more confused.

The officer took pity, and explained: “If we go into their houses all the time, if you arrest people all the time, if they feel terrified all the time, they will never attack us. They will only feel chased after.”

Such deaths rarely make headlines here, but Palestinians are well aware of them. So long as they continue ... we can all expect many more opportunities to grieve.

That, Efrati said, “was the first time I understood that everything I was told was complete bullshit.” From then on, he said, “I didn’t stop doing the things I did, I just stopped thinking.”

Of course Efrati’s officer was wrong. If you terrorize people long enough, they eventually lose their fear. They hold onto the anger. This last October, after a year of relative calm, young Palestinians began attacking Israeli soldiers, police and civilians, occasionally with guns or cars but most often with household implements: knives, scissors, screwdrivers. The attacks were uncoordinated and outside the control of the Palestinian leadership or the traditional armed factions. Many occurred in or near Hebron, often at checkpoints or other sites of friction between Palestinian civilians and the Israeli military, but also on buses and trains in Jerusalem, in supermarkets and in the streets.

In November, Major General Herzl Halev, Israel’s highest ranking military intelligence officer, explained to Prime Minister Benjamin Netanyahu’s cabinet that the attacks were not primarily ideological. They were, he said, motivated by rage and frustration and carried out by youth — mainly teenagers — who “felt they had nothing to lose.” In fact, they had a great deal to lose, as much as anyone, their whole lives ahead of them. But the fact that so many were willing to throw it away, and to take others with them, testifies to the depths of the despair bred by Israel’s occupation.

When I was back in Israel and the West Bank earlier this month, the violence appeared to be ebbing. Until Wednesday’s shootings, no Israelis had been killed by Palestinians since February 18. In the same period, Israeli security forces killed 34 Palestinians, including a six-year-old girl and her 10-year-old brother who died when an air strike hit their family’s home in the Gaza Strip. Their names were Israa and Yasin Abu Khussa. Such deaths rarely make headlines here, but Palestinians are well aware of them. So long as they continue, and the occupation drags on, we can all expect many more opportunities to grieve.

Ben Ehrenreich is a freelance journalist and novelist. This article has been adapted from his latest book, The Way to the Spring: Life and Death in Palestine, which was published on June 14 by Penguin Press.