Palestinian officials say militants have agreed to halt mortar and rocket attacks on Jewish settlements in the Gaza Strip that have threatened to derail a three-month cease-fire with Israel .