About a month ago a Palestinian security officer shot three Israeli soldiers near the settlement of Beit El before being shot and killed by Israeli soldiers. He was the second Palestinian security officer involved in an attack on Israelis since the recent wave of attacks began last October.

Although Palestinian Authority (PA) security forces were involved in these two attacks, this is not emblematic of the security forces since the end of the Second Intifada.

With the help of security assistance over the past eight years, the United States has helped the Palestinians build effective and professional forces that have resulted in a more stable, less violent West Bank.

Transformation through US aid

Recently though, with the rise of lone-wolf attacks and skirmishes between the Israeli military and Palestinians, security is becoming more fragile, but not due to a lack of effort from PA security forces.

Since 2008, the US has provided more than $815m in security assistance to Palestinian security forces, mostly through the International Narcotics Control and Law Enforcement programme - making Palestine one of the largest recipients of assistance through that programme during that period.

The US funds have now trained more than 20,000 of the 45,000 PA security forces and provided thousands of pieces of non-lethal equipment from uniforms to vehicles.

From case management to civil-military relations, PA security forces have received basic training skills such as marksmanship and more advanced training on counterterrorism.

The security forces have been condensed from more than 10 independent agencies to eight structured units with operational delineation: They created a division between the civil and military justice sectors, and built training facilities.

Security cooperation does not just benefit Israel though, which helps explain why Abbas has been so hesitant to end the relationship. By working with the Israelis, Palestinians understand that their best hope for a future state will take convincing Israel that they are capable of overseeing security in the West Bank.

In addition, the Palestinian Ministry of Interior now regularly develops three-year security sector strategy reports. The most recent report (2014-2016) includes points of emphasis on community engagement, respect for the rule of law, financial accountability, and promotion of human rights and gender equality.

Maybe most importantly though, relative calm returned to the West Bank following the disorder of the Second Intifada that included rampant crime and extortion in addition to the violence.

Deteriorating rule of law

But it's not all good news. More than 80 percent of Palestinians see the PA as corrupt. In addition, despite improvements, the PA security forces have continued to violate human rights including cases of torture and infringements on free speech (PDF).

In one recent example, the PA arrested journalist Salim Sweidan on questionable charges like "the publication of articles harmful to Palestinian national unity". He was released four days later on $1,400 bail and an online apology, but still faces a court date on March 12 according to a conversation with Sweidan.

As Yezid Sayigh, a senior associate at the Carnegie Middle East Centre noted, "enhanced technical capability and growing professionalism do not guarantee the rule of law," and in fact has only led to further authoritarianism.

One of the main reasons for providing an average of more than $100m a year in US security assistance has been not just to build effective forces, but to incentivize security cooperation between Israel and Palestine.

OPINION: Freedom is a constant struggle

In reality though, effective policing and cooperation cannot be provided under the occupation. According to interviews I conducted with officers in the Ministry of Interior, policing the West Bank is impossible without coordinating with Israel. For example, the PA security forces need approval to even move units outside of or between Area A of the West Bank.

In a recent poll though, 70 percent of Palestinians favoured ending cooperation. The PA security forces are seen as subcontractors allowing Israel to maintain the occupation while softening Israel's image at home and abroad.

OPINION: The 100-year Intifada

This, in part, led the Palestinian Liberation Organisation's Central Committee to vote to suspend all security cooperation with Israel, and PA President Mahmoud Abbas to declare that Palestine was no longer bound by the Oslo Accords - although neither has led to a disruption in cooperation.

Many Israelis, on the other hand, support cooperation. It allows the Israeli military, who has ultimate control over all areas of the West Bank, to save blood and treasure by not having to serve as the primary police force in Area A, while still helping it collect intelligence to thwart attacks on Israelis.

Some Israelis still don't trust the PA security forces, fearing turmoil similar to the Second Intifada where they resorted to violence against Israeli forces.

A test case

Security cooperation does not just benefit Israel though, which helps explain why Abbas has been so hesitant to end the relationship. By working with the Israelis, Palestinians understand that their best hope for a future state will take convincing Israel that they are capable of overseeing security in the West Bank.

The recent violence wave might be its toughest test since 2008, but it seems to be holding things together - if just barely.

The head of the General Intelligence Service, or Mukhabarat, Major General Majid Faraj insisted that since October of last year, PA intelligence has prevented 200 attacks against Israelis, confiscated weapons, and arrested approximately 100 Palestinians.

Ultimately however, as the UN Secretary General Ban Ki-moon recently noted, "Palestinian frustration and grievances are growing under the weight of nearly a half-century of occupation."

The US security assistance has helped professionalize the PA security forces and create a relatively stable West Bank, but that success relies on the hopes of a Palestinian state. And they seem to be running out of it.

Seth Binder is the programme manager for the Security Assistance Monitor at the Centre for International Policy.

The views expressed in this article are the author's own and do not necessarily reflect Al Jazeera's editorial policy.