Egypt has brokered a ceasefire between Palestinian militant factions and Israel after four days of violence, a security official said.

He said the ceasefire went into effect on Monday night, but it was not immediately clear when a formal announcement would be made. The official said the Palestinians agreed to stop launching rockets at southern Israeli cities and Israel agreed to stop targeting militants in air strikes.

Neither Palestinian militant groups nor Israel would comment, but there were no reports of violence.

Israeli Prime Minister Benjamin Netanyahu had warned Israel would keep striking those trying to harm its civilians and was "ready to broaden its operation".