GAZA CITY, Gaza City — With a deadline looming hours away, Hamas on Thursday rejected Israeli demands it disarm and threatened to resume its rocket attacks if its demands for lifting a crippling blockade on Gaza were not met.

The hard-line stance, voiced by a senior Hamas official at the group’s first rally since a cease-fire in the Gaza war took effect on Tuesday, signaled that indirect negotiations in Cairo over a permanent truce in Gaza were not making headway. It was an ominous sign ahead of Friday’s expiration of a temporary three-day truce that ended a month of fighting.

A text message from Hamas’ military wing, the Izzedine al-Qassam Brigades, warned there would be no extension of the cease-fire if there was no agreement to permanently lift the blockade enforced by Israel and Egypt since the militant group overran Gaza in 2007.

Abu Obeida, the al-Qassam spokesman, appeared on the group’s Al-Aqsa TV station and said Hamas was “ready to go to war again.” He threatened to launch a long-term war of attrition that would cripple life in Israel’s big cities and disrupt air traffic at Israel’s international airport in Tel Aviv.

He also appealed to Hamas negotiators in Egypt not to accept an extension of the cease-fire without an agreement on lifting the blockade. A security official in Egypt said Egyptian negotiators were struggling to bring the two sides closer together, with one official saying Hamas and other Gaza militants were refusing to compromise.

Israeli Prime Minister Benjamin Netanyahu vowed a tough reaction if Hamas renews hostilities.

“They might reject an extension. If they attack us, we’ll respond in kind, as any government would,” he told Germany’s ZDF television.

An Israeli defense official said Israel would respond “forcefully,” and that Netanyahu and his defense minister, Moshe Yaalon, had instructed the military “to be ready for anything.” He spoke on condition of anonymity because he was not authorized to talk to the media.

About 2,000 people showed up for Hamas’ rally in the heart of Gaza City on Thursday, well below the levels of similar gatherings on previous occasions. The modest turnout was not necessarily a sign of waning support for the group, but most likely a reflection of the fatigue felt by most of Gaza’s 1.8 million residents after four weeks of a ruinous war, as well as anxiety over whether the three-day truce will be extended.

“Our fingers are on the trigger and our rockets are trained at Tel Aviv,” al-Masri told the rally.

Nearly 1,900 Palestinians, three-quarters of them civilians, have been killed, more than 9,000 wounded and some 250,000 people made homeless, according to Palestinian medical officials and the United Nations. Israel lost 64 soldiers and three civilians.