President Barack Obama said on Monday he was encouraged by Egypt's proposal for a ceasefire between Israel and the Palestinians and sided with Israel against what he called "inexcusable attacks."

Obama's comments came as he presided over an annual Iftar dinner at the White House in celebration of the holy month of Ramadan.

In remarks to dinner guests, who included diplomats from the Arab and Muslim world, Obama said the US goal continued to be peace and security for Israelis as well as Palestinians.

"Now I will say very clearly, no country can accept rockets fired indiscriminately at citizens. And so we've been very clear that Israel has the right to defend itself about what I consider inexcusable attacks from Hamas," he said.

At the same time, he added: "The death and injury of Palestinians civilians is a tragedy, which is why we've emphasized the need to protect civilians regardless of who they are and where they live."

Obama said the United States would do everything it could to bring about a return to a 2012 ceasefire between the parties.

"We are encouraged that Egypt has made a proposal to accomplish this goal which we hope can restore a calm that we've been seeking. More broadly, the situation in Gaza reminds us again that the status quo is unsustainable and the only path to true security is a just and lasting peace between Israelis and Palestinians," he said.

The American-Arab Anti-Discrimination Committee, the largest Arab-American organization in the United States, had urged Muslims to boycott the dinner to protest what the group called Obama's condoning of the killing of Palestinians.

Please LIKE our Facebook page - it makes us stronger