Hamas said it would respect the deal, which materialised after months of mediation by Egypt.
"Hamas will adhere to the timetable which was set by Egypt, but it is our right to respond to any Israeli aggression before its implementation," Fawzi Barhoum, a Hamas spokesman, said.
If the ceasefire deal lasts for three days, Israel will ease its blockade on Gaza, allowing vital supplies into the territory.
If the truce holds after that, it will lead to talks on opening the Rafah crossing between Gaza and Egypt.
It is unclear if the deal involves any type of prisoner exchange.
Egypt opened its border with the Gaza Strip on Wednesday, a security official said, to allow Palestinians to return to the territory after receiving medical treatment.
The official said the opening of the border crossing was "exceptional", and was only done so that sick Gazans could return home.
Israel's decision to observe the ceasefire comes after a senior aide to Barak returned from Cairo, where he met Egyptian officials who had mediated with Hamas.
Amos Gilad said on public radio that the "question with the Egyptians on the agreement regarding a total ceasefire was that if there is new firing [from Gaza], no matter by whom, it will be a violation of the agreement".
He said he was confident that Egypt would stop weapons from being smuggled to the Gaza Strip from Sinai.
Gil Hoffman, a political analyst at the Jerusalem Post, told Al Jazeera the deal had the potential to make a lasting change.
"The practical effects of this [ceasefire] is that you are going to see a real effort on both sides to make lives better on both sides of the border."
Pressure on Olmert
Hoffman said the ceasefire agreement would help Olmert amid an investigation that he allegedly accepted bribes before he became prime minister.
"This has come at a time when he is facing enough problems with criminal investigations. To have quiet in the Gaza Strip is something that would help him out tremendously."
Islamic Jihad, a Palestinian group which frequently fires rockets at Israel from Gaza, said it would observe the truce despite having reservations about the deal.
"Despite our reservations over the truce agreement, we will not stand in its way and will not seek to cause its failure out of concern for Palestinian unity and in order to achieve the lifting of the blockade [on Gaza]," Nafez Azzam, a leader of the group, said on Wednesday.
"We did not sign any document but we gave our verbal agreement to Hamas and to Egypt while at the same time expressing our reservations."
Khalil al-Haya, a Hamas leader, speaking at a news conference in Gaza on Tuesday, said that Egypt will seek to extend the truce into the West Bank.
Timeline: Ceasefire efforts
June 17, 2008: Truce announced between Israel and Gaza's Hamas government, to take effect from June 19
June 11, 2008: Israel's security cabinet backs Egypt's truce efforts but says army has been instructed to prepare for possible Gaza offensive if mediation fails
March 4, 2008: Egypt calls for ceasefire between Hamas and Israel
January 23, 2007: The Rafah border wall is blown up and tens of thousands of Palestinians pour into Egypt from Gaza to shop for food and fuel in short supply because of the Israeli-led blockade. The border is sealed again a few days later
November 27, 2007: US hosts a peace conference, eliciting promises from Israel and the Palestinians to try to forge a two-state agreement before end of 2008
June 14, 2007: Hamas seizes Gaza after overpowering Fatah forces in a week of fighting in which killed at least 100 people. Abbas later dismisses Hamas-led unity government and appoints a Fatah-backed administration. Israel tightens a blockade of Gaza
Egyptian authorities will hold a meeting with Hamas and the Palestinian Authority a week after the end of the truce in order to open the Rafah crossing with Egypt, al-Haya said.
"We respect the terms of the truce, and in case of any problems, we will seek Egypt's help," he said.
Reacting to the news of the truce, Tom Casey, a US state department spokesman, said: "It hardly meets the terms that the Quartet has laid out, nor those of [Palestinian] president [Mahmoud] Abbas for the reincorporation of Hamas into the Palestinian political process."
Ayman Mohyeldin, Al Jazeera's correspondent in Gaza, said that Hamas is confident that the ceasefire deal is workable.
"The military in Gaza, which comes under Hamas jursidiction, would be able to halt and suspend all rockets into southern Israel, and stop any further attacks.
"There is also the belief that the border crossing deal [will] come into play - allowing necessary fuel back into the territory and therefore reducing power cuts. It will allow a sense of normalcy to resume here.
Mohyeldin quoted a Hamas official as telling him that they do not want to be held responsible for all Palestinian factions in the territory.
"As a result, Egypt, in their mediation efforts, presented the ceasefire conditions to all Palestinian factions so that all those who accept the ceasefire will have to abide by its conditions," he said.
Regev said last week that Israel would continue preparations for broad military action as a matter of national security.
"What is important is not words but actions," he said, repeating Israel's demands for an end to attacks on Israeli civilians, a halt to arms smuggling into the Gaza Strip, and progress towards the release of Corporal Gilad Shalit, an Israeli soldier seized by Gaza fighters two years ago.
Hamas have pushed for the release of about 450 Palestinians from Israeli jails, but this demand is not thought to be included in the deal.