Israeli artillery shelled a town in the northern Gaza Strip on Monday, killing five Palestinians and wounding at least nine people, hospital officials said.

The attacks occurred in Beit Lahiya, a town often used by Palestinian militants to launch rockets at Israel. The army said militants had fired from Beit Lahiya at least seven rockets at southern Israel on Monday, causing no casualties.

In one artillery attack, Israeli shells exploded near an apartment building, leaving a large crater in the ground. Residents ran through the area in a frenzy, with some fleeing while carrying their children.

Visit FOXNews.com's Mideast Center for more in-depth coverage.

A security official at the scene said another shell exploded in an open space between two apartment buildings, hitting residents standing there.

Other shells shattered the windows and facade of another apartment building.

The Israeli military said its attacks were aimed at two groups of Hamas militants firing rockets at southern Israel and that it regretted if civilian casualties resulted. Before the artillery attacks, Israel had asked Palestinian security officials to warn the residents of Beit Lahiya to remain indoors during the shelling, a security official said.

Ahmed Obeid, 40, who lives in an apartment whose windows were shattered and walls cracked by the impact of two shells, said he was having lunch with his wife and two children when the attack started. "If we had not moved to the hall, we would have been killed," he said.

Obeid said he was released from an Israeli prison six years ago in a prisoner swap between Israel and Palestinian authorities, and that he is now "being tortured" by living in an apartment that is in "the direct line of fire" of Israeli shelling.

Doctors identified the dead Palestinians as Saadi Ahmed, 30; Sadek Nasser, 32; and Nasser's 14-year-old cousin, Salah Nasser. The names of the other two fatalities were not immediately available.

On June 28, Israel launched a military offensive in the Gaza Strip after Palestinian militants attacked an Israeli outpost near the Gaza border, killing two Israeli soldiers and capturing a third. The offensive also is aimed at stopping militants firing homemade rockets into southern Israel.

More than 100 Palestinians have been killed in the offensive, the majority of them gunmen.

On July 12, Lebanese Hezbollah guerrillas captured two Israeli soldiers and killed eight others in a raid on Israel's northern border, opening a second front in Israel's battle against Islamic militants.

Hezbollah and the Palestinians have offered to free the captured Israeli soldiers, if Israel agrees to release hundreds of Hezbollah and Palestinian prisoners, an offer Israel has rejected.

U.S. Secretary of State Condoleezza Rice arrived in the Middle East on Monday to explore the possibility of cease-fires in the Gaza and Lebanon conflicts.

She was expected to meet with moderate Palestinian President Mahmoud Abbas in the West Bank to discuss the crisis in the Gaza Strip.

But Palestinians are planning a general strike and "a day of rage" in Gaza on Tuesday to protest the Rice visit, said Omar Assaf, a member of a committee that coordinates joint actions by Palestinian political groups in Gaza and the West Bank. Rice is "not welcome," Assaf said in a telephone interview Monday. "She is responsible for the killing of children in Lebanon and Gaza. She, her administration, and her policies are not welcome here."

Assaf urged shops in Gaza City to close during the protest on Tuesday.

Sami Abu Zuhri, a spokesman for Hamas, the Islamic militant group that dominates the Palestinian government, said, "We will participate in the strike."

"Rice's visit is not welcome," he said in an interview. "It comes in the context of American domination aimed at reorganizing the region to reflect Israeli interests."

Visit FOXNews.com's Mideast Center for more in-depth coverage.