Democratic presidential candidate Senator Barack Obama (D-IL) speaks at his South Dakota and Montana presidential primary election night rally at the Xcel Energy Center in St. Paul, Minnesota June 3, 2008. REUTERS/Eric Miller

WASHINGTON (Reuters) - Democratic presidential candidate Barack Obama said on Wednesday Iran posed a serious threat in the Middle East and vowed to stop it from acquiring a nuclear weapon.

“The danger from Iran is grave, it is real, and my goal will be to eliminate this threat,” Obama said in a speech to a conference of the American Israel Public Affairs Committee, a pro-Israel lobby group.

“I will do everything in my power to prevent Iran from obtaining a nuclear weapon, everything in my power to prevent Iran from obtaining a nuclear weapon - everything,” he said to a standing ovation.

Obama also vowed to vigorously support Israel’s right to defend itself and pledged an active effort to pursue a Middle East peace agreement in a broad speech on the region he delivered a day after clinching the Democratic presidential nomination.

“I will always stand up for Israel’s right to defend itself in the United Nations and around the world,” Obama said.

Some of Obama’s critics have sought to undercut his support with Jewish voters by suggesting that he would be more inclined than the Bush administration and Republican presidential candidate John McCain to put pressure on Israel to make concessions in any peace negotiations.

Obama has been seeking to dispel that notion in campaign events that include the AIPAC speech and a forum with Jewish voters in Florida last month.

McCain has criticized Obama’s call for talks with Iran, a state Israeli leaders consider a threat to Israel’s security.