Training at the IDF's Counter-Terrorism School, near Modi'in in central Israel.

On Friday night July 21, Maj. Hanan (full name withheld for security reasons) received word of a gruesome development.

A knife-wielding Palestinian terrorist had killed three members of an Israeli family in the settlement of Halamish. The terrorist, a 19-year-old Palestinian from a nearby village, was shot and injured by an Oketz K9 unit soldier, who lived next door.

By the time Hanan, who heads the Counter-Terrorism Branch in the IDF's Counter-Terrorism School, arrived at the blood-stained scene, there was little he or his soldiers could do.

"We scanned the area searching for more potential attackers, and spent the rest of Shabbat there," he said.

Hanan and his soldiers are not an ordinary response unit-they're the ones responsible for training all of Israel's elite special forces.

"We can't be a school that is disconnected from what is happening on the ground," Hanan told JNS.org. "I arrived there with my team, and we started to work."

The IDF's Counter-Terrorism School, based near Modi'in in central Israel, was founded in the 1970s as a response to a wave of terrorist airplane hijackings and bus attacks.

Since then, Hanan said, the threat has evolved in a major way, and the IDF branch's job is to make sure that it's up to date, as it shapes Israel's counter-terrorism combat doctrine.

The Counter-Terrorism School is made up of Hanan's branch as well as a branch that trains soldiers in underground warfare, which Hanan had helped set up and command. His experience as a paratrooper company commander who fought in Gaza during the 2014 summer conflict proved useful for that job.

An additional branch is dedicated to training the military's snipers, and a fourth specializes in rope climbing and abseiling (also known as rappelling) techniques for combat units.

Taking part in operations on the ground is one way Hanan's branch makes sure it stays up to date, he said.

"Outside of Israel, we see states falling apart, and many terrorist organizations filling up vacuums, which enable them to grow stronger. Some are becoming semi-military," he said. Such enemies threaten Israel with rockets, missiles and plans to infiltrate Israel, either overground or through tunnels.

The Counter-Terrorism Branch monitors tactics used by lone-wolf terrorists. The special forces that are trained by the branch range from commando units to covert elite units. They also include reconnaissance units that are part of every IDF infantry brigade. After completing their lengthy, grueling training, the units go on standby, ready to move into action in several areas if called upon.

"We try to give them the best training and equipment," Hanan said. "They will need to conduct complex missions."

According to Hanan's assessments, the forces he trains will need to know how to operate skillfully in civilian areas.

The Counter-Terrorism Branch studies incidents such as the July 14 terror attack near Jerusalem's Temple Mount, in which a cell of three Arab jihadist gunmen shot dead two Israeli Druze policemen, and looks for lessons. The branch pours over speeches made by Hezbollah leader Hassan Nasrallah, in which he threatens to "conquer" the Galilee, and draws its conclusions.

"We understand that the enemy will try to enter Israel, and move the fighting into our territory, with large numbers of attackers and weapons. This calls for selective combat, but at a higher level of intensity than we have known," Hanan said.

"We could find ourselves in an Israeli village near Gaza, engaging a Hamas cell, which is backed by Hamas fighters launching mortars at us. And civilians would be stuck in this," the branch chief added. "We need to prepare for that, and come up with suitable replies. If this occurs, our objective will be to finish it as quickly as possible, with minimal achievements by the enemy, and maximal achievements by us."

To make that happen, Hanan said, his instructors must take part in real-life operations.

"As a school, our approach says that you can't teach something that you're unable to do alone, or have no experience in," he said. "Therefore, we instruct our cadets, individually and in teams. Afterwards, we instruct them on how to instruct...And where we can, we go out and do operations."

The IDF is keen to use Counter-Terrorism School's personnel and experience. The instructors are placed on standby shifts in case of emergencies.

"My soldiers, who train other units, stood in that home in Halamish, in which a terrorist had murdered civilians a few moments ago," Hanan said. "They emerged from that as different instructors... We need to be ready for the next war, not the last one."