Israeli authorities and leaders in the Hamas-controlled Gaza Strip have agreed to a ceasefire that ends one of the deadliest bouts of fighting the region has seen in four years.

Egyptian Foreign Minister Mohammed Kamel Amr announced the agreement Wednesday, which went into effect at 9 p.m. Cairo time.

The truce has also been confirmed by Israeli Prime Minister Benjamin Netanyahu, who said he agreed to it after consulting U.S. President Barack Obama.

Kamel Amr made the announcement at a news conference alongside U.S. Secretary of State Hillary Rodham Clinton, who arrived in Cairo on Wednesday to participate in the negotiating process.

“Today’s agreement is a step in the right direction that we should build on,” Clinton told reporters. “Now we have to focus on reaching a durable outcome that promotes regional stability and advances the stability, dignity and legitimate aspirations of Palestinians and Israelis alike.”

The truce marks an end to more than a week of fighting that’s seen the deaths of more than 140 Palestinians, many of them civilians, and five Israelis.

Egypt had announced early on that it would try to broker a ceasefire between the two sides, which appeared unwavering in their positions.

Both Israel and Hamas had refused to agree to a ceasefire until the other side stopped fighting first.

Among its other terms, Hamas had asked Israel to lift its long-time blockade on Gaza and stop targeted assassinations of Hamas leaders and military commanders.

According to a copy of Wednesday’s truce, obtained by wire service the Associated Press, both Israel and Hamas officials in Gaza have agreed to stop exchanging fire.

The copy also indicates that Israel will stop the targeted killing of Hamas officials, while Hamas will stop rocket fire by militant groups in the Gaza Strip.

In a separate news conference, Israeli Prime Minister Benjamin Netanyahu confirmed that he and the United States would begin working together to stop the smuggling of arms into Gaza.

“I agreed that it was a good idea to give an opportunity to the ceasefire in order to enable the situation to be calmed and to enable Israeli citizens to return to their day-to-day lives,” Netanyahu said, his words interpreted by an English translator. “At the same time, it is self-evident that Israel cannot sit and accept as our enemies continue to arm themselves with terrorist arms.”

Netanyahu said he did not rule out the possibility of conflict and a “military response” in the future, but conceded that right now Israel is willing to effort a long-term ceasefire.

The dispute -- the most intense the region has seen in years -- drew commentary from several world leaders, including UN chief Ban Ki-moon and Canadian Prime Minister Stephen Harper, who expressed that Israel had a right to defend itself from Hamas-launched rocket fire.

Foreign Affairs Minister John Baird told reporters Wednesday afternoon that he was cautiously optimistic about news of a ceasefire and lauded the Egyptian government’s efforts to broker a deal between the two sides.

“We are pleased that this new government in Egypt has accepted its responsibility. It’s a major player in the region and has used its influence that it has for good, and we welcome that,” he said.

Baird said the government strongly differentiates between Hamas -- which he described as a listed terrorist organization -- and the Palestinian leadership.

“I would reject that President (Mahmoud) Abbas and the Prime Minister have anything to do with these types of reprehensible tactics,” said Baird. “They have preached non-violence.”

For its part, the United States plans to spend the following days working with Egypt in an effort to make further progress in improving the Israel-Gaza relationship, Clinton said.

“Ultimately, every step must move us toward a comprehensive peace,” she told a Cairo news conference. “There is no substitute for a just and lasting peace.”

But even after the ceasefire agreement was announced, an air-raid siren could be heard in southern Israel, signalling a rocket attack. Meanwhile, an airstrike was heard in the Gaza Strip.

It’s estimated that Israel has launched more than 1,500 airstrikes and other attacks on Gaza targets since the fighting began in mid-November.

During the same time, more than 1,000 Hamas-launched missiles are believed to have been directed at Israel.

An agreement appeared elusive just one day earlier, as Clinton shuttled between Jerusalem and the West Bank on Tuesday, meeting with Israeli Prime Minister Benjamin Netanyahu and Palestinian President Mahmoud Abbas.

Complicating matters, there were fears that a bomb explosion aboard a Tel Aviv city bus Wednesday morning would foil negotiations.

At least 27 people sustained moderate to serious injuries when the blast ripped through a bus across from Israel’s national defence headquarters, emergency responders said.

Rescue officials escorted injured parties from the area, littered with broken glass from the bus’ blown-out side windows. Blood was visible on pavement near the scorched bus.

Israeli police said they believe the incident was a terror attack, though no group has claimed responsibility for it. Reports indicate that in Gaza, the explosion was praised over mosque loudspeakers and welcomed on Hamas television, but not explicitly claimed by the group.

An eyewitness told the Associated Press that moments before the explosion, an unidentified man placed a device on the bus and then disembarked.

Israel’s Deputy Prime Minister Silvan Shalom, who heard the explosion from his Tel Aviv office, had referred to the blast as “an escalation” of recent violence.

Several observers had referred to Tuesday as the most intense day of violence yet between Israel and the Hamas-controlled Gaza Strip.