(CNN) -- Barack Obama has strongly backed Israel in his first foreign policy speech since becoming the presumptive Democratic presidential nominee, just two days after he was accused of naivete by Republican challenger John McCain.
Democratic presidential hopeful Barack Obama has said that he is a "true friend of Israel."
Speaking to the American Israel Public Affairs Committee, an influential pro-Israel lobbying group, Obama said, "Any agreement with the Palestinian people must preserve Israel's identity as a Jewish state, with secure, recognized and defensible borders. Jerusalem will remain the capital of Israel, and it must remain undivided."
The Palestinians also want Jerusalem to be the capital of their own country. United States policy has long been intentionally vague on the status of Jerusalem. The U.S. Embassy in Israel is in Tel Aviv, not Jerusalem.
Presumptive Republican presidential nominee John McCain, speaking at the same gathering Monday, attacked Obama's Middle East policy. In particular, he criticized Obama's stated willingness to meet with the leaders of countries like Iran, as well as voting against a measure to label Iran's Revolutionary Guard a terrorist organization.
In his speech, Obama called Iran the greatest threat in the Middle East but reiterated his willingness to meet with the Islamic state's leaders under appropriate conditions.
"Contrary to the claims of some, I have no interest in sitting down with our adversaries just for the sake of talking. But as president of the United States, I would be willing to lead tough and principled diplomacy with the appropriate Iranian leader at a time and place of my choosing -- if, and only if, it can advance the interests of the United States," he said.
In his address, Obama also faced head-on rumors that he is a Muslim and does not support the Jewish state, calling himself a "true friend of Israel."
He opened his speech by paying tribute to rival Hillary Clinton, calling her an extraordinary public servant who had made history alongside him in their 16-month race for the party's presidential nomination. Clinton, speaking directly after Obama, said he will be a "a good friend to Israel" if elected.
On Tuesday, Obama passed the necessary threshold of 2,118 delegates and superdelegates who decide on the party's nomination for the White House race, CNN projected, in what Obama described as a "defining moment for our nation."
His victory came after he beat Clinton -- herself seeking to become the first female nominee -- in the final two primary contests that have brought nearly 35 million of their supporters to the polls.
"Tonight, we mark the end of one historic journey with the beginning of another, a journey that will bring a new and better day to America," Obama told a frenzied rally crowd at St. Paul, Minnesota, on Tuesday. Watch Obama declare himself the nominee »
"Tonight, I can stand before you and say that I will be the Democratic nominee for president of the United States."
Obama and Clinton ended the round of Democratic primaries by splitting the final two states: Montana and South Dakota. Despite his loss in South Dakota, Obama gained the necessary delegates an hour before the Montana polls closed.
Speaking in New York on Tuesday, Clinton congratulated Obama for his campaign, but she did not concede the race or discuss the possibility of running as vice president, despite reports earlier in the day that she would quit and join the Obama ticket. Watch Clinton's speech »
Clinton will officially suspend her campaign for the presidency by the end of the week, her campaign said.
When Obama declared his candidacy in February 2007, he was an obscure first-term senator, unknown outside the U.S. and facing an uphill battle. Clinton, a former first lady and New York senator, was the favored candidate.
Eleven months later, Obama has proved the cynics wrong. He won Iowa's first-in-the-nation caucuses, and, in what he called a "defining moment in history," he told his supporters "change is coming." Watch a recap of the primary season »
In the weeks that followed, what was once a wide field of candidates narrowed as Obama, once a long-shot for the nomination, reached the final two.
Obama and Clinton, who boasted 35 years of experience and big-money backers, took the stage across all 50 states, engaging in more than 20 often bitter debates.
As the competition stiffened, exchanges became heated, taking in issues such as race, comments by the clergy at Obama's church and whether Clinton "misstated" about coming under fire in Bosnia.
One key issue was Obama's experience. Did a 46-year-old junior senator from Illinois have what it takes to become the Democratic nominee?
Obama, the son of a white woman from Kansas and a man from a small village in Kenya, said yes.
He has become accustomed to defying expectations from earlier in his career, both as the third African-American since the American Civil War to be elected to the U.S. Senate and as the first African-American president of the prestigious Harvard Law Review.
Obama tried to avoid being cast as the black candidate, persistently preaching a message of hope and unity that was criticized by his opponents as offering rhetoric and not solutions.
Now Obama has to turn his full attention to presumptive Republican nomination McCain and the general election in November -- and already, the pair have given a glimpse of the issues that will become the themes of their campaigns.
Previewing the battle ahead, Obama laid out his case against McCain, the presumptive Republican nominee.
"This is our time. Our time to turn the page on the policies of the past," he said. "It's not change when John McCain decided to stand with George Bush 95 percent of the time, as he did in the Senate last year." Watch Obama take aim at McCain »
But just hours earlier, McCain argued that he represents the change the country needs. "No matter who wins this election, the direction of this country is going to change dramatically. But the choice is between the right change and the wrong change, between going forward and going backward," he said. Watch McCain go on the offensive against Obama »
CNN's Kristi Keck contributed to this report.