The United States and United Nations condemned the school shelling and Hamas said it fired rockets into Israel in retaliation for both attacks.
But hours after its condemnation the US said it had agreed to sell Israel fresh ammunition to replenish its dwindling supplies.
At least 17 people were killed in the strike on the market in Shejaiya, near Gaza City, as Israel observed a four-hour humanitarian lull in other parts of the crowded coastal strip.
At least 200 people were wounded in the strike, medics said, on a day that saw at least 111 people killed.
Early Thursday two more people died of wounds sustained previously, bringing the death toll from 23 days of unrelenting Israeli attacks to 1,363.
Read: Israeli strikes hit UN school, Gaza shopping area
Palestinians who lost relatives in an Israeli strike on a compound housing a UN school in Jabalia refugee camp in the northern Gaza Strip, mourn outside the Kamal Edwin hospital in Beit Lahia where victims from the attack were brought. (AFP photo)
Read: Pray for Gaza: Muslims in India worried about Israeli assault
Hamas said on Wednesday it fired rockets at Tel Aviv and the southern port city of Ashkelon in response to the market and school strikes.
The Israeli military said that a rocket hit open ground "in the Tel Aviv area" and another two were intercepted over Ashkelon.
It said that a total of 81 rockets fell in Israel on Wednesday, with another nine shot down by missile defences and that Israel hit 88 targets in Gaza.
Israel had said its brief truce would not apply in places were troops were "currently operating", hours after the army made what it called a "significant advance" into the narrow coastal strip.
Hamas denounced the four-hour lull as a publicity stunt, saying it had "no value".
Read: Israel intensifies Gaza assault, bombs power plant
The market strike came hours after Israeli shells slammed into a UN school in Jabalia refugee camp which was sheltering some 3,300 homeless Gazans, killing 16 and drawing a furious response from the United Nations.
"This morning a UN school sheltering thousands of Palestinian families suffered a reprehensible attack," UN chief Ban Ki-moon said on a visit to Costa Rica.
"It is unjustifiable, and demands accountability and justice."
The attack was also denounced by the White House in a carefully worded statement that avoided mentioning Israel.
Israeli soldiers of the 155mm artillery cannons unit fire towards the Gaza Strip from their position near Israel's border with the coastal Palestinian enclave. (AFP Photo)
"The United States condemns the shelling of a UNRWA school in Gaza, which reportedly killed and injured innocent Palestinians, including children, and UN humanitarian workers," a statement said.
The Pentagon later said it had granted an Israeli request for ammunition, including some from a stockpile stored by the US military on the ground in Israel for emergency use by the Jewish state.
But Pentagon spokesman Rear Admiral John Kirby said in a statement that Defense Secretary Chuck Hagel told his Israeli counterpart Moshe Yaalon that he was concerned about the deadly consequences of the spiralling conflict, and called for a ceasefire and end to hostilities.
Rights group Amnesty International had urged Washington to halt arms supplies to Israel.
"It is time for the US government to urgently suspend arms transfers to Israel and to push for a UN arms embargo on all parties to the conflict," it said in a petition to US secretary of state John Kerry.
Read: England's Moeen Ali barred from wearing Gaza wristbands
School shelling 'intolerable'
It was the second time in a week that a school run by the UN agency for Palestinian refugees was hit, prompting a blistering attack on Israel by UNRWA Commissioner General Pierre Kraehenbuehl.
"I condemn in the strongest possible terms this serious violation of international law by Israeli forces," he said, indicating the school's location had been communicated to the Israeli army 17 times.
"No words to adequately express my anger and indignation," he wrote on his official Twitter account, describing it as "intolerable".
But Canadian Prime Minister Stephen Harper on Wednesday blamed Hamas for the heavy loss of civilian life in Gaza.
"They have initiated and continue this conflict, and continue to seek the destruction of the state of Israel," Harper a longtime supporter of Israel, said in televised remarks.
In Israel, the army said three soldiers were killed in Gaza, raising the overall number of soldiers killed to 56 since the operation began on July 8.
Public radio quoted Major General Sami Turgeman, the senior officer for the Gaza region, as saying that the destruction of militants' remaining tunnels into Israel could be complete "in a few days".
Israel has said uncovering and destroying an apparently sophisticated network of tunnels is a primary goal of its assault.
Israeli team in Cairo
But there appeared to be little Israeli appetite for a truce, despite an hours-long meeting of the security cabinet, with a senior official telling Haaretz newspaper that the Jewish state was not even close to a ceasefire.
"When a ceasefire proposal that answers Israel's important needs is laid on the table, it will be considered," he said, warning that the military operation would expand.
"The (military) will expand attacks against Hamas and the rest of the terror organisations."
Nevertheless, a two-member Israeli delegation travelled to Cairo late Wednesday to discuss a possible ceasefire with Egyptian officials, an official at the airport told AFP, saying they were expected to leave after several hours.
Cairo, a key mediator in previous truce negotiations between Israel and Hamas, was also expected to host a Palestinian delegation later this week.
Public radio said that the full Israeli cabinet would convene on Thursday for the first time since the start of the Gaza operation.
Full Coverage: Gaza under attack