Israel restricted Palestinian access to Jerusalem's Al-Aqsa mosque compound on Friday and kept a tight grip on security as a first death tested a hard-won truce ending fighting in and around Gaza.

Prime Minister Benjamin Netanyahu's rightwing Likud party meanwhile prepared for a crunch primary Sunday amid signs its popularity was slipping among Israelis who would have preferred a ground invasion of the Hamas-controlled strip.

Tensions on the streets of annexed Arab east Jerusalem remained high a day after angry demonstrators stormed an Israeli police station in a bid to secure the release of a Palestinian woman who tried to stab a border guard.

Israel decided to take out extra precautions by barring Palestinians under 40 from accessing the Al-Aqsa mosque in Jerusalem -- Islam's third holiest site -- which is also revered by Jews.

"An extensive police force and border guards will also be deployed in sensitive areas around the Old City of Jerusalem," police spokeswoman Luba Samri said.

The mosque compound in Jerusalem has been the focus of past clashes and Israel sought to prevent any repetition that could jeopardise the truce ending eight days of fighting in which 163 Palestinians and six Israelis died.

The ceasefire itself was holding firmly despite a dozen rockets being fired at Israel from Gaza in the first post-truce hours and a warning from Netanyahu that he would resume the offensive if need be.

The Palestinians also reported their first post-conflict casualty at the hands of Israeli soldiers who allegedly opened fire on a group of farmers near the Gaza border on Friday.

"This is the first Israeli violation of the truce," Sami Abu Zuhri, spokesman of the Islamist movement Hamas which rules Gaza, told AFP.

Hamas "will raise this violation with Egyptian mediators to make sure that it does not happen again," he added.

An Israeli army spokeswoman said the troops were forced to take action after hundreds of Palestinians attacked a border fence in an apparent attempt to take it down.

"The soldiers proceeded to fire warning shots in the air, but the Palestinians continued to close in, and the soldiers then fired at their feet," the spokeswoman said by telephone.

No rockets were fired in reprisal by Hamas.

The Palestinian emergency services identified the dead man as Abdelhadi Qdeih Anwar, 21. They said he was killed in the southern Gaza village of Khuzaa. Nineteen other Palestinians suffered gunshot wounds.

The first opinion polls assessing the government's handling of the Gaza conflict in the run-up to a snap general election called for January showed a general sense of disappointment that Israel had accepted the ceasefire terms.

A study commissioned by the Maariv newspaper found 49 percent of respondents saying Israel should have continued its operation of air strikes and just 31 percent agreeing with the truce.

The same poll showed support for Netanyahu's Likud party slipping by six percentage points over the past month.

But Likud was still leading the opposition Labour party by a 37 to 22 percent margin and on pace to form a new governing coalition with ultra-nationalist and Jewish Orthodox groups.

Maariv said many Israelis felt the truce spelled a "missed opportunity" for the Jewish state to eradicate Gaza's Hamas leaders.

"The ceasefire agreement was essential in the wake of the global and international circumstances and the heavy pressure placed on Israel" by the United States, Maariv wrote.

But "it seems that most of the public in the country has a hard time accepting these explanations."

Sunday's Likud primary will decide who makes it onto the party list to be put to voters in the January 22 election. Analysts are watching to see if the party tilts further to the right in response to public disaffection over the truce.