Israel, it seems, has found a new weapon against Palestinian attacks – the humble cucumber seed.

Soldiers have been handing out seeds at checkpoints with advice to Palestinians – a nation of farmers until their lands were swallowed up by Jewish settlements – to stop their recent knife attacks on Israelis and invest in a peaceful future.

Palestinians were not fooled. The seeds, the packets revealed, were produced by the very settlements that corralled them into their urban enclaves.

Israel’s image-laundering is directed at western nations that have propped up the occupation – economically and diplomatically – for decades. As ever, Israel hopes to persuade outsiders that the occupation is benevolent.

The futility of its PR, however, is highlighted by the latest initiative of prime minister Benjamin Netanyahu’s government.

New legislation is designed to intimidate and silence Israeli human rights organisations – the international community’s eyes and ears in the occupied territories. These groups are to be defined as “moles”, or agents of foreign governments. Justice minister Ayelet Shaked warned that such foreign intervention “endangers democracy”.

The problem is that the governments funding the human rights activity are not Israel’s enemies, but some of its staunchest supporters – European states.

Israel treats Europe’s support for human rights as malign interference, but it welcomes the vast sums channelled its way via the European Union’s special trade agreement and the billions in US military aid. It is this kind of foreign intervention that sustains the occupation.

The new legislation, however, risks leaving the EU and US exposed. Removing the minimal restraints imposed on the Israeli army by monitoring activity, the crimes of occupation – and western complicity in them – will be all the starker.

Western governments have made a show of their retaliation. They warn that, without a two-state solution, Israel is hurtling towards a binational reality and comparisons with apartheid.

Seeking to bolster the EU’s recent feeble move to recommend labelling settlement products, its foreign ministers passed a resolution last week requiring all agreements with Israel to exclude the settlements.

Europe has hinted that other penalties are in the pipeline.

The United States echoes Europe. Its ambassador to Israel, Dan Shapiro, last week broke with US protocol and admitted that Israel has two standards of law in the West Bank, distinguishing between Palestinians and Jewish settlers.

It was the nearest Washington has dared to suggest that Israel already enforces an apartheid system in the territories.

Unused to having the US wash its dirty linen in public, Israel fumed. One of Netanyahu’s former aides even hurled an anti-Semitic insult at Shapiro, calling him a “little Jewboy”.

Israeli officials are reported to believe that the US and Europe are acting in concert to arm-twist Israel back into negotiations. Europe, they argue, is carrying out Washington’s “dirty work”.

They may not be far off the mark. A report last week by Human Rights Watch, a US group with ties to the State Department, added to the pressure, warning companies in the occupied territories that they are violating international law.

Omar Barghouti, a Palestinian co-founder of the movement to boycott Israel, called the report “ground-breaking”. It floated the idea that the US and Europe should deduct funding to Israel “equivalent to its expenditures on settlements and related infrastructure in the West Bank”.

As Barghouti noted, that skates close to calling for western sanctions against Israel.

Netanyahu did not sound alarmed at Sunday’s cabinet meeting by the various admonishments. He focused instead on praising “courageous” settlers who had evicted Palestinian families next to the flashpoint of the Ibrahimi Mosque in the Palestinian city of Hebron.

This week, the first new plans for settlement-building in 18 months were announced.

Netanyahu knows that the likelihood of the US, or Europe, truly penalising Israel is still far off.

The terrible truth for those who support the Palestinian cause is that these last months of the Obama administration are likely to be as bad as it gets for Israel. Whoever follows – whether Hillary Clinton or any of the current crop of Republicans – will almost certainly tone down Washington’s criticisms, and rein in Europe.

Last year, one of Obama’s Middle East aides promised that Washington would “always have Israel’s back”. Illustrating that commitment, US officials due in Israel this week are expected to offer new weapons systems as a reward for Israel’s silence on Iran.

The struggle for two states appears finished. As Netanyahu averred recently, Israel would prefer to “live forever by the sword” than concede territory to the Palestinians. The message of the dovish opposition leader, Isaac Herzog, is softer but the same. At the weekend he told the French president, Francois Hollande: “Now is not the time for a Palestinian state.”

The US and EU can keep chasing the chimera of a two-state solution. But Israel is busy cultivating – not cucumbers, but the fruits of an occupation without a visible end.