Israel and Hamas agreed Wednesday to a five hour cease-fire in order to allow humanitarian aid into Gaza, following a request from the United Nations Relief and Works Agency.

The Israeli military said in a statement Wednesday that it would hold its fire for five hours starting at 10:00 a.m. local time on Thursday.

It warned however that it will retaliate "firmly and decisively" if Hamas or other militant groups launch attacks on Israel during that time.

The spokesman for Hamas, Sami Abu Zuhri, later confirmed to Fox News that Hamas had accepted the truce.

The cease-fire request came from U.N. Special Coordinator for the Middle East Robert Serry, Haaretz reports. After news of the cease-fire broke, Israel’s “Iron Dome” missile defense system continued to intercept rockets heading toward Israel, the newspaper added.

Earlier in the day, Israeli Prime Minister Benjamin Netanyahu called on the international community to condemn Hamas for committing a “double war crime” of firing barrages of rockets at Israelis while using Palestinians as human shields.

Netanyahu, speaking at a news conference, said "Israel will continue to do what it needs to do to defend itself until peace and quiet are restored,” according to the Jerusalem Post.

He added that the demilitarization of Gaza is "most important step for the international community to insist on."

The comments came as a senior Hamas official said the militant group has formally closed the door on the Egyptian proposal for a cease-fire aimed at ending the conflict with Israel.

Sami Abu Zuhri said Wednesday in a text message to The Associated Press that the group "informed Cairo today officially that we don't accept the proposal they made."

Israel had held out hope that the cease-fire deal plan could be salvaged. But Abu Zuhri says it has been definitively rejected.

Both sides once again exchanged a flurry of rockets Wednesday.

As of Wednesday afternoon, the Israeli Defense Forces (IDF) said it had struck 50 Hamas targets in Beit Lahiya -- a town of approximately 70,000 people in northern Gaza -- the Zeitoun and Shijaiyah neighborhoods of Gaza City and other parts of northern Gaza.

The website of the Gaza Interior Ministry said Israeli warplanes hit 30 houses, including those of senior Hamas leaders Mahmoud Zahar, Jamila Shanti, Fathi Hamas and Ismail Ashkar.

Zahar was a key figure in Hamas' violent takeover of Gaza in 2007, while the other three were members of the Palestinian parliament elected in 2006. Many Hamas leaders have gone into hiding since the beginning of the Israeli offensive.

Israeli warplanes also bombed a coastal road west of Gaza City, killing four Palestinian boys, who were cousins and ages 9 to 11, said Ashraf Al Kedra, a Palestinian doctor. Seven others -- adults and children -- were wounded in the strike, he said.

The boys' uncle, Abdel Kareem Baker, 41, raged at Israel after the attack.

"It's a cold blooded massacre," he said. "It's a shame who come they didn't identify them as kids with all of the advanced technology they claim they're using."

The Israeli military said it was looking into the incident.

In response, Hamas fired 74 rockets at Israel Wednesday, 29 of which were intercepted by the country’s “Iron Dome” missile defense system, according to the IDF’s Twitter account.

The IDF also reported that 100 of Hamas’ rockets have struck their own territory since fighting erupted on July 8.

Prior to the intensified strikes in Gaza, Israel warned thousands of Palestinians living in the area Wednesday to “evacuate immediately” or face danger.

An Israeli military spokeswoman told The Wall Street Journal that residents of Beit Lahiya and parts of Gaza City had been warned by telephone.

On Wednesday morning, hundreds of residents of Zeitoun and Shijaiyah were seen walking in the streets, carrying small bags with belongings.

Older children carried smaller ones, in their arms or on their backs. Some of the women and children cried, looking terrified.

The Israeli newspaper Haaretz reported that 100,000 automated calls had been made to Gaza residents, but that number was not confirmed by the military.

The warnings were also delivered by text message and by leaflets dropped from planes. The Israeli military said in its message that large numbers of rockets were launched from these areas and that Israel plans to bomb these locations.

"Whoever disregards these instructions and fails to evacuate immediately, endangers their own lives, as well as those of their families," the message said.

Gaza residents told The Wall Street Journal that most of Beit Lahiya had already emptied out even before the latest warnings. But many residents in other parts of northern Gaza have decided to stay.

The Wafa Rehabilitation Center in Shijaiyah, which cares for 15 disabled and elderly patients, received several calls demanding the patients evacuate, director Basman Ashi told the AP. He said a shell fired by Israel hit near the building, causing damage to the second floor, but no injuries. Ashi added that he wouldn't evacuate his elderly patients, claiming they had nowhere to go.

An Israeli military spokesman told the Associated Press that the hospital's residents "have been asked repeatedly to leave."

"There is a rocket launching site in the area," the spokesman said, adding that Gaza militants are using the center to hide "behind civilians."

Four foreign volunteers -- from England, the U.S., France and Sweden -- have set up camp at the rehabilitation center to deter the military from targeting it.

English volunteer Rina Andolini, 32, said the patients range in age from 12 to over 70, and none can walk or move without assistance. She said there are also 17 Palestinian staff members.

Andolini said the patients are living in a constant state of fear, intensified by the Israeli tank shelling from across the border.

The Palestinian death toll in nine days of fighting rose to 204, with some 1,450 wounded, Palestinian health officials said.

However, it is not clear how many of the dead are civilians and how many are Hamas militants.

On the Israeli side, one man was killed and several people were wounded since the fighting erupted on July 8.

Hamas had come under pressure from the international community to reverse its initial rejection of the Egyptian cease-fire proposal, which would have gone into effect Tuesday morning had both sides agreed. Instead, Hamas announced its rejection of the proposal moments after Israel announced that its Security Cabinet had accepted it.

"I cannot condemn strongly enough the actions of Hamas in so brazenly firing rockets in multiple numbers in the face of a goodwill effort to operate a cease-fire," U.S. Secretary of State John Kerry said Tuesday.

"I hope the Hamas leadership now understand the best thing to do is to call a halt, have the negotiation, discussion, and sit down with everybody to work out a long-term, viable plan for Gaza," former British Prime Minister and Middle East peace envoy Tony Blair told Sky News.

Click here for more from The Wall Street Journal.

The Associated Press contributed to this report.