US President Barack Obama said Wednesday that while he did not care for Hamas, the Gaza Strip could not remain permanently closed off from the world.

“I have no sympathy for Hamas. I have great sympathy for ordinary people who are struggling within Gaza,” Obama said.

Speaking at a press conference, Obama said that the United States was supportive of ceasefire talks between Israel and Hamas but that “long-term, there has to be a recognition that Gaza cannot sustain itself permanently closed off from the world.”

Ordinary Palestinians living in the impoverished, blockaded Hamas-ruled territory need to “have some prospects for an opening of Gaza so that they do not feel walled off,” Obama said.

Obama reiterated his concern about civilians killed in the conflict, which left 1,886 Palestinians dead, according to officials in the Hamas-ruled Gaza Health Ministry. Israel says that hundreds of them are gunmen. Sixty-four soldiers and three civilians on the Israeli side were killed in the month-long conflict.

Obama insisted he has “consistently supported Israel’s right to defend itself” and repeatedly castigated Hamas, saying that the terror group has acted “extraordinarily irresponsibly” by launching rockets into Israel.

The people of Gaza need greater hope for the future, he said as he urged the extension of the 72-hour ceasefire that was brokered by Egypt and which went into effect Tuesday morning.

“The US goal right now would be to make sure that the ceasefire holds, that Gaza can begin the process of rebuilding,” Obama said.

Similarly, he said, Israelis need to “feel confident that they’re not going to have a repeat of the kind of rocket launchers that we’ve seen over the last several weeks.”

Israel and Hamas appeared to be at odds on the extension of the ceasefire that expires at 0500 GMT on Friday.

Negotiators from Israel were meeting with a Palestinian delegation in Cairo for talks on extending the temporary ceasefire and trying to resolve underlying issues to broker a more lasting truce. Officials from the US, the United Nations and Mideast nations were helping foster the discussions, which began with both sides taking hard-line positions and much jockeying expected ahead.

Obama said that peace efforts needed to involve the Palestinian Authority President Mahmoud Abbas, amid US fears that the conflict has empowered the more militant Hamas.

Obama said that the Abbas-led Palestinian Authority, based in the West Bank, has been “responsible” by recognizing Israel and seeking a two-state solution.

“I think Abu Mazen is sincere in his desire for peace, but they (the Palestinian Authority) have also been weakened, I think, during this process,” Obama said, referring to Abbas by his nom de guerre.

“The populations in the West Bank may have also lost confidence or lost a sense of hope in terms of how to move forward,” he said.

Prime Minister Benjamin Netanyahu said Wednesday that the Palestinian Authority should play an “important” role in the Gaza Strip.

In late April, Netanyahu ended further negotiations with Abbas after he formed a unity goverment with Hamas amid the breakdown of the US-led peace process.