The last Israeli soldier was withdrawn from the Gaza Strip by dawn Wednesday, more than three weeks after Israel's forces began a bruising offensive against Hamas militants in the Palestinian territory, Israeli military officials said.

Thousands of ground troops entered the coastal strip earlier in January as part of an offensive that began Dec. 27. Israel said the offensive was aimed at halting rocket attacks from the militant group Hamas and the smuggling of weapons into the territory.

The timing of the Israeli withdrawal appeared aimed at defusing a crisis before U.S. President Barack Obama entered the White House.

Meanwhile, Israeli troops remained massed on their side of the border, prepared to take action in the event of renewed fire.

"We've redeployed on our side of the frontier, and we will follow events closely," said Mark Regev, a spokesman for Israeli Prime Minister Ehud Olmert.

"If Hamas breaks the ceasefire, we, of course, reserve the right to act to protect our people."

Obama calls Mideast leaders

The new U.S. president placed calls on Wednesday to Olmert, Palestinian Authority President Mahmoud Abbas, Egyptian President Hosni Mubarak and Jordan's King Abdullah to "communicate his commitment to active engagement in pursuit of Arab-Israeli peace from the beginning of his term," White House press secretary Robert Gibbs said.

Presidential aide and senior negotiator Saed Erekat said Obama called Abbas to say he hoped to work toward peace "in full partnership" with the Palestinian leader.

Abbas's Fatah party governs in the West Bank and is a rival to Hamas, the Palestinian militant group that rules Gaza.

Also Wednesday, the Associated Press reported that Israeli navy ships fired machine-guns in northern Gaza, but the government made no immediate comment about it.

Since both sides declared a ceasefire over the weekend, there have been reports of weapons fire. Israel reported mortar shelling from Gaza Tuesday, while Palestinians said Israeli troops shot and killed two Gaza farmers along the border.

White phosphorus allegations

The Israeli military said it has launched an internal investigation into allegations that it used white phosphorus munitions, an allegation made by UN officials and human rights groups.

The poisonous substance, which inflicts burns, is used to create smokescreens to mask forces. It ignites when exposed to air and forms white fumes.

The conflict has killed about 1,300 Palestinians, more than half of them civilians, according to Gaza and United Nations officials.

Thirteen Israelis have also died, including four soldiers killed inadvertently by their own forces' fire.

Israeli Foreign Minister Tzipi Livni is heading to Brussels Wednesday in hopes of clinching a deal committing the European Union to contributing forces, ships and technology to operations aimed at stopping the militants from smuggling weapons into Gaza.

Most smuggling of weapons and rockets was done through tunnels underneath the 15-kilometre border between Egypt and Gaza. Israel bombed most of the tunnels during the offensive.

Last week, the United States signed an anti-smuggling deal with Israel calling for expanded intelligence co-operation between the two countries and other allies in Europe and the Middle East.

Though signed by former U.S. president George W. Bush, it is binding on the Obama administration.

UN Secretary General Ban Ki-moon left the region Wednesday after touring Gaza and southern Israel.  He called for a probe into the Israeli shelling of UN compounds in the Palestinian territory and called the fighting "outrageous."

With files from the Associated Press