The Hamas (search) militant group has agreed to halt mortar and rocket fire on Jewish settlements in the Gaza Strip (search), a deal meant to save a truce threatened by three consecutive days of violence, the Palestinian interior ministry said Saturday.

Hamas agreed to stop the fire at a late-night meeting on Thursday between Interior Minister Nasser Yousef (search) and the Islamic group's leadership, said ministry spokesman Tawfiq Abu Khoussa (search).

Palestinian leader Mahmoud Abbas (search) said Saturday that the fighting had subsided, and he didn't expect it to overshadow his meeting next week with President Bush.

Israel threatened harsh retaliation after the fighting erupted Wednesday, and warned the Palestinians that a cease-fire declared in February was in danger of collapse. Since Wednesday, Israeli troops have killed three Palestinian militants. Militants have fired 60 mortar shells and homemade rockets at Gaza settlements.

The violence erupted after a long spell of relative quiet in nearly five years of fighting, threatening Israeli plans to withdraw this summer from all the Gaza Strip and four West Bank settlements.

Hamas is challenging Abbas' ruling Fatah party in a parliamentary election scheduled for mid-July, leading Israeli security officials to speculate Hamas violence is meant to strengthen the group and embarrass Abbas ahead of the vote.

"Our brothers in Hamas reaffirmed their commitment to the quiet," Abu Khoussa said. Asked if Hamas had agreed to stop firing at Jewish settlements, he said: "Yes. They agreed not to do that."

Israel has accused the Palestinian Authority of not doing enough to stop the militants from firing at Jewish settlements in the Gaza Strip. But earlier this week Hamas militants used fists, rocks and gunfire to prevent Palestinian police from deploying and preventing the rocket fire.

At Thursday's meeting, the sides discussed the incident. Hamas denied its people fired on troops, but witnesses confirmed there was gunfire.

On Friday, Yousef toured the Khan Younis and Rafah areas of Gaza — some of the most violent spots in the coastal strip — and ordered his men to preserve the truce, Palestinian security officials said on condition of anonymity.

"The events are minor and they have calmed down," Abbas said in Cairo. "I think that the situation has begun to come under control in Gaza. That's why this will not have any negative impact on my visit to America."

Brushing off the latest agreement between Hamas and the Palestinian Authority, Raanan Gissin, an adviser to Prime Minister Ariel Sharon, said Israel's army will operate in any areas where there is violence.

"Any agreement between the Palestinian Authority and the terrorist organization is their business. Up until now we have seen what these agreements are worth. If there will be quiet we will respond with quiet. If there is fire ... of mortars and homemade rockets then we will respond in kind," Gissin said.

Hamas — which made a strong showing in recent municipal elections in the West Bank and Gaza Strip — is expected to make more gains in the upcoming parliamentary elections. Abbas said Hamas is a political player that cannot be ignored.

"Hamas has now participated in the local council elections and has succeeded in some locations — and it will participate in the legislative elections and will become part of the political system," Abbas said. "No one can stop it if it succeeds (in these elections) from becoming part of this system."

Abbas stopped in Cairo Saturday at the end of a two-week tour of South America and Asia. Abbas discussed his upcoming trip to Washington with Egyptian President Hosni Mubarak, and was to return to the Palestinian territories later in the day.

Abbas suggested he would meet Sharon on June 7, but the Israeli Prime Minister's Office denied a meeting had been scheduled.