"The enemy has failed to achieve its goals," Ismail Haniyeh, the top Hamas leader in the territory, said in a speech broadcast on Hamas television.
Though he called the war, in which more than 1,300 Gazans and 13 Israelis died, a "popular victory" for Palestinians, Haniyeh said Hamas' decision to declare a truce on Sunday was "wise and responsible".
Earlier Sunday Hamas announced an immediate ceasefire by its fighters and allied groups in the Gaza Strip and gave Israel a week to pull out its troops.
"Hamas and the factions announce a ceasefire in Gaza starting immediately and give Israel a week to withdraw," said Ayman Taha, a Hamas official in Cairo for talks with Egypt on a truce deal. The Islamic Jihad joined the ceasefire announcement.
Hamas also demanded that Israel open all of the Gaza Strip's border crossings to allow in food and other goods to meet the "basic needs for our people".
Ali Waked contributed to the report