Hamas in Gaza wants to preserve a truce with Israel so that it can strengthen its Islamist regime and military wing. But when it comes to the West Bank, it has a whole different policy. In the West Bank, Hamas works around the clock to trigger deadly terrorism against Israelis.

But Hamas’s attempt to create quiet in Gaza while setting the West Bank on fire could well end up leading the flames back to its Gazan turf.

Recent terrorist shootings in the West Bank, likely conducted by a Ramallah-based Hamas cell, have targeted Israelis at bus stops. The shootings claimed the lives of a premature baby, as well as two IDF soldiers, while injuring several others.

Initial indications suggest that a Hamas cell based in the Ramallah area is behind the attacks, in which terrorists fired automatic firearms.

An Israeli counter-terror raid resulted in the killing of a Hamas operative, Salah Barghouti, suspected of acting as a shooter in one of the incidents, and the arrest of other cell members. Following the raid, Hamas admitted that Barghouti was from its ranks, and that he was indeed behind one of the shootings.

Meanwhile, Palestinian Authority security forces have reportedly identified Jasser Barghouti, a Gazan Hamas operative who was released by Israel from prison in the 2010 Schalit prisoner exchange, as directing the Ramallah cell. Barghouti is related to the West Bank suspected gunman and reportedly a member of the “West Bank headquarters,” a section of Hamas’s military wing dedicated to exporting terrorism.

Hamas wants to extend its control beyond Gaza’s borders and onto West Bank Palestinians. To do this, it needs to undermine the Fatah-dominated Palestinian Authority, which is based in the West Bank. Destabilizing the area through acts of armed violence against Israelis promotes this goal by drawing in Israeli security operations, increasing tensions and unrest and weakening the P.A.’s image. The attacks also serve Hamas’s core jihadist ideology against Israel.

So while Hamas declares truces in Gaza, it continues to promote deadly violence in the West Bank, thereby preserving its regime, while still acting out on its jihadist DNA.

One goal: End Israeli-P.A. security coordination

Hamas political bureau chief Ismail Haniyeh openly acknowledged this policy during a speech Sunday in Gaza: “I will also respond to the Zionists who are saying what is happening in the West Bank is based on directives and arrangements from Gaza. This is an accusation we do not deny … because it is a source of pride reigning over all of us.”

Addressing a massive Gazan rally to mark 31 years since Hamas’s founding, which featured a parade of armed units and truck-mounted rockets, Haniyeh also made it clear that his organization’s policy is to prioritize West Bank violence. “We place our hopes in the West Bank, which is the main area where events are occurring and the most appropriate area to resolve the conflict with our Zionist enemy,” he said.

The Israel Defense Forces and Shin Bet intelligence agency have taken down some members of the Ramallah cell and are working with increased numbers of security forces on the ground to restore security.

But Israel has warned that the days in which it accepts this type of situation may be coming to an end.

“I conveyed a clear message to Hamas: We won’t accept a situation of a truce in Gaza and terror in Judea and Samaria [the West Bank],” Israeli Prime Minister Benjamin Netanyahu told his cabinet on Sunday.

His warning has far-reaching consequences if it translates into military action.

Hamas works every day, using operating bases in Gaza, Lebanon and Turkey, to turn the West Bank into a terrorism launchpad. It sends money, instructions and know-how to budding cells.

Other Hamas cells in the West Bank are more localized, inspired by Hamas’s call to violence and taking the initiative on their own.

Preventative Israeli security operations have thwarted hundreds of plots by Hamas cells this year alone. It seems unlikely, however, that Hamas will hit the brakes on its West Bank terrorism project, as this would spell the end of Hamas in its current form.

If Hamas does not cease this activity, according to Netanyahu’s warnings, a future attack that breaks through Israel’s defenses could trigger Israeli airstrikes on Hamas targets in Gaza, marking an end to the truce.

It remains unclear whether this new Israeli warning will affect Gaza’s ongoing terrorism exports to the West Bank.

Hamas chiefs likely celebrated last week when they saw Israel place Ramallah—the de facto capital of its rival, the P.A.—on lockdown as part of searches for terrorist perpetrators. Their plan to kill two birds with one stone—weakening the P.A. and murdering Israelis—had achieved a brutal success. But if they begin to believe that such attacks will jeopardize their home regime in Gaza, will they be as pleased?

Usually, Israel tries to limit the entrance of its army into Area A of the West Bank, where most Palestinians live, to reduce friction and promote stability. But Hamas’s murderous activities could reverse that effort, which would harm both Israel and the P.A., just as Hamas hopes.

An additional Hamas goal is to end Israeli-P.A. security coordination, which has been a big contributor to stability.

In addition to Ramallah, Hamas has been working extra hard in recent years to promote violence in Jerusalem and at the Al-Aqsa holy site, knowing this is a highly flammable flashpoint that can spill over into the West Bank.

Hebron, a traditional Hamas stronghold in the West Bank that has sites like the Cave of the Patriarchs and Matriarchs, which are holy to both Judaism and Islam, represents another potential hot spot that Hamas could seek to exploit through violence.

Hamas’s actions in the near-term future will help reveal whether it has taken Netanyahu’s threat seriously.

Past experience indicates that Hamas will not be in any rush to slow down its West Bank terrorism program, even if this ends up placing its Gazan regime in Israel’s sights.

Yaakov Lappin is a military and strategic affairs correspondent for JNS. He also conducts research and analysis for defense think tanks, and is the Israel correspondent for IHS Jane’s Defense Weekly. His book, The Virtual Caliphate, explores the online jihadist presence.