The Gaza Strip's ruling Hamas militant group on Tuesday said it has reached a cease-fire with Israel meant to halt a violent cycle of Palestinian rocket attacks that have killed seven Israelis over the past year and Israeli reprisals that have killed more than 400 Palestinians.

The Egyptian-brokered accord, set to go into effect Thursday, has the bigger aim of ending Israel's yearlong economic blockade of Gaza and bringing home a captive Israeli soldier. But the phased approach is prone to pitfalls, and past truces have quickly broken down. Israel cautiously promised a "new reality" if the rocket fire ends.

The announcement capped months of Egyptian-brokered negotiations that have been repeatedly marred by violence. The deal was first announced in Cairo by Egypt's state-run news agency and quickly confirmed by Hamas. However, Hamas said it would respond to "any Zionist aggression."

Underscoring the fragile situation, Israeli aircraft attacked three targets in southern Gaza, killing a total of six Palestinian militants, medical officials said. In response, Palestinian militants fired seven rockets into Israel, the Israeli military said.

Still, after months of fighting, both sides are interested in a period of calm.

Israel wants to halt the incessant rocket and mortar attacks on its southern communities, which have killed four Israelis this year and disrupted the lives of thousands. It also wants an end to Hamas arms smuggling into Gaza from Egypt, and the return of Cpl. Gilad Schalit, the soldier captured by Hamas-linked militants in a cross-border raid two years ago.

Hamas, meanwhile, wants Israel to lift its crippling blockade of Gaza, which has caused widespread shortages of fuel, electricity and basic goods. Israeli imposed the sanctions after Hamas violently seized control of Gaza last year, and has tightened the blockade recently in response to increased rocket fire.

Gaza Hamas leader Mahmoud Zahar said all the armed factions in Gaza are on board with the truce. Speaking after another Hamas official outlined details of the truce at a news conference, Zahar said Hamas will not put down its weapons, because he did not believe Israel would implement the cease-fire. "We don't trust them, but let's see," he said.

Israeli Defense Minister Ehud Barak said Tuesday that no deal was in place yet. "It is too soon to announce a truce, and even when it begins, if it does, it is hard to evaluate how long it would last," he said, adding, "The Israeli military is ready for any development."

Moderate Palestinian President Mahmoud Abbas, a rival of Hamas, welcomed the accord. "President Abbas considers the (truce) as a national interest for our people," said a statement from his West Bank office, hoping for an end to the Israeli blockade of Gaza.

The state-run Egyptian news agency MENA cited an unidentified high-level Egyptian official as saying a "mutual and simultaneous calm" would take effect at 6 a.m. Thursday (0300 GMT). It described the calm as the "first phase" of a wider deal.

Egyptian, Israeli and Hamas officials all said the talks would quickly move to the larger issues of the blockade and captive soldier.

An Egyptian official told The Associated Press that after three days, Israel would begin to open Gaza's border crossings to let more supplies into the area. A week later, he said, Israel planned to allow in additional goods.

The official said in a final phase, Israel would consider approval of the reopening of Gaza's Rafah border crossing with Egypt. He said the idea is for the truce to last six months.

The Rafah crossing, the main gateway for Gaza's 1.4 million people to travel abroad, has been sealed since the Hamas takeover of Gaza. The closure has prevented people from traveling for medical care, studies and family visits.

In January, Hamas blew up the border wall between Egypt and Gaza, allowing people to move in and out of Egypt for nearly two weeks before it was resealed.

A Hamas official said the issues of Rafah and the captured soldier would be tied to each other, and he expected talks to begin within days. Israeli defense officials said they expected negotiations on the soldier to begin Sunday.

The officials all spoke on condition of anonymity, saying they were not permitted to go on the record with the information.

Israeli government spokesman Mark Regev would not confirm a deal, but voiced hope for its success.

"If there is a total absence of terror attacks from Gaza into Israel, and if there is an end to arms buildup in Gaza Strip and movement on the hostage Gilad Schalit, that will indeed be a new reality," he said.

Past cease-fires, most recently in November 2006, lasted only for several weeks, and many obstacles threaten the latest deal.

Israel is suspicious of Hamas' motives since the group has said it wants to use the lull to rearm. And negotiations on the soldier are sure to be complicated. Israel has balked at Hamas demands that it release hundreds of Palestinian prisoners, including people convicted in the deaths of Israelis, in exchange for the soldier.

There is also the constant threat of an outbreak in violence, as Tuesday's fighting demonstrated. Gaza's landscape includes Islamic Jihad and other tiny armed groups that sometimes act independently of Hamas.

For now, Hamas appears to be relying on calls for Palestinian unity to maintain the truce. It made sure to include Islamic Jihad in the consultations with Egypt. On Tuesday, Islamic Jihad said it would honor the agreement as long as Israel didn't attack.

An improvement in living conditions in Gaza could also strengthen the calm. Gaza is suffering from dire shortages of fuel, cement and other basic goods. If residents feel relief, it is likely to build public support for the quiet.

Iranian-backed Gaza militants have been bombarding southern Israel with rockets and mortars for seven years. The rate of fire increased after Israel pulled its troops and settlers out of Gaza in 2005 and stepped up further last year after Hamas wrested power from forces loyal to Abbas.

While conducting peace talks with Abbas, Israel has carried out air and ground attacks in Gaza that have killed hundreds of Palestinians, many of them civilians.

Israel has repeatedly warned it is preparing for a massive invasion of Gaza if the rocket fire persists. But Israel has been reluctant to launch the offensive, fearing heavy casualties in the crowded urban environment.