The Hamas militant group says it has accepted an Egyptian-Qatari ceasefire proposal to halt the seven-month war with Israel.

It issued a statement on Monday saying its supreme leader, Ismail Haniyeh, had delivered the news in a phone call with Qatar’s prime minister and Egypt’s intelligence minister.

The two Middle Eastern nations have been mediating months of talks between Israel and Hamas.

There was no immediate comment from Israel.

The announcement came hours after Israel ordered Palestinians to begin evacuating the southern Gaza town of Rafah ahead of an Israeli military operation.

Israel says Rafah is Hamas’s last stronghold.

News of the Hamas announcement sent people in Rafah cheering in the streets.

Details of the proposal were not immediately released, but in recent days, Egyptian and Hamas officials have said the ceasefire would take place in stages in which Hamas would release hostages it is holding in exchange for Israeli troop pullbacks from Gaza.

It is not clear whether the deal will meet Hamas’s key demand of bringing about an end to the war and complete Israeli withdrawal.