U.S. President Barack Obama pledged Thursday to "actively and aggressively" seek a peace agreement between Israel and the Palestinians, while also warning "difficult days lie ahead" in Afghanistan.

Obama's comments came during an address to the State Department in Washington D.C, just moments after he named two foreign policy veterans, George Mitchell and Richard Holbrooke, as special envoys for the Middle East and Afghanistan and Pakistan.

Mitchell, a former Senate majority leader who helped secure a peace deal in Northern Ireland in the Bill Clinton administration, will try to revive the stalled Arab-Israeli peace talks and will be sent to the region as soon as possible, Obama said.

Weighing in on the Israel-Hamas conflict for the first time following his inauguration, Obama called on Hamas to end rocket fire at Israel, and for Israel to complete its pullout of forces from Gaza.

Obama said he's "deeply concerned" by the loss of life among both Israelis and Palestinians, and by the suffering taking place in Gaza. But he also vowed the United States will always defend Israel's right to defend itself.

Hamas must meet demands of Mideast Quartet

Obama also said Hamas, which controls the Gaza Strip, must meet the demands of the so-called Mideast Quartet to recognize Israel, renounce violence and honour past agreements, The quartet comprises the United States, Russia, the United Nations and the European Union.

He added the borders to Gaza must be opened to allow the flow of aid and commerce under the watch of an "appropriate" monitoring regime with international community and the Palestinian Authority participating to provide a "credible" system of ending weapons smuggling into Gaza.

The Palestinian Authority is controlled by West-Bank based President Mahmoud Abbas, who has held no authority in Gaza since June 2007, when Hamas defeated forces loyal to his Fatah movement in the coastal territory.

Mitchell said he'll be facing a "volatile, complex and dangerous" conflict —one that has become so entrenched, it's seen by many as unchangeable.

Israel launched its bruising offensive against Hamas militants in the Palestinian territory on Dec. 27 with the dual aims of halting rocket attacks into southern Israeli towns and ending weapons-smuggling into the territory.

Before the ceasefire took hold last weekend, the conflict 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.

Afghanistan, Pakistan 'central front'

Afghanistan and Pakistan, Obama said, represent the "central front" in what he dubbed America's "enduring struggle" against terrorism and extremism, a phrase the new administration has offered in recent days instead of the Bush administration's "war on terror."

"There, as in the Middle East, we must understand that we cannot deal with our problems in isolation," Obama said. "There will be no lasting peace unless we expand the spheres.

"There is no answer in Afghanistan that does not confront the al-Qaeda and Taliban bases along the border, and there will be no lasting peace unless we expand spheres of opportunity for the people of Afghanistan and Pakistan," the president said.

He also praised Holbrooke, the former U.S. ambassador to the United Nations, as "one of the most talented diplomats of his generation."

Holbrooke, 67, was the chief architect of the 1995 Dayton Peace Agreement, which ended the war in Bosnia.

With files from the Associated Press