Thousands of Israeli demonstrators thronged a Jerusalem square on Saturday, concluding a four-day march from the Gaza border intended to pressure the government to free hostages held in the Palestinian territory.

Prime Minister Benjamin Netanyahu's government has faced mounting calls to bring home the 130 captives Israel says remain in the Gaza Strip -- including 31 who are presumed dead.

They are among the 250 Israelis and foreigners abducted during Hamas's October 7 attack that triggered the ongoing war.

The unprecedented attack on southern Israel also resulted in the deaths of around 1,160 people, mostly civilians, according to an AFP tally of official figures.

In almost five months of war since then, at least 30,320 people, mostly women and children, have been killed in Gaza, according to the Hamas-ruled territory's health ministry.

Protesters in Jerusalem waved flags and raised posters with the hostages' pictures or slogans calling for their release.

Organisers said 20,000 people participated in either the march or Saturday's rally.

"Now, now, all of them now," the crowd chanted during the rally which also featured prayers, songs and remarks from relatives.

"I was scared because I thought people are starting to forget or starting to get indifferent" about the captives' fate, said 50-year-old protester Daphna Keidar.

"But this is different" from past rallies, she said. "This is bigger."

As the rally was underway in Jerusalem, a senior US official said a truce deal which may see hostages freed could be within reach.

Mediators have scrambled to lock in a new truce before the Muslim fasting month of Ramadan begins later this month.

The US official, speaking on condition of anonymity, said on Saturday that Israel had "more or less accepted" a ceasefire deal and that "the ball is in the camp of Hamas".

Also on Saturday, thousands of anti-government protesters gathered in Tel Aviv to call for early elections.

In Jerusalem, a relative of one of the hostages still in Gaza said he hoped the rally would signal to officials that freeing the hostages must be their top priority.

"They must seal this deal no matter what," said Eyal Kalderon, cousin of hostage Ofer Kalderon.

"I don't know if they will have another chance. It's now or maybe never."

Reut Diamant, a 53-year-old demonstrator, told AFP that all Israelis "should be marching and should be coming to these events in order to show how important it is".

"I don't know anyone personally" who was abducted, she said.

"But it could have happened to my kids who are in the army, or to anyone else that I know."