Bush said in Jerusalem on Thursday: "Some seem to believe that we should negotiate with the terrorists and radicals, as if some ingenious argument will persuade them they have been wrong all the time.
"We have heard this foolish delusion before. As Nazi tanks crossed into
Poland in 1939, an American senator declared: 'Lord, if I could only have
talked to Hitler, all this might have been avoided.'
"We have an obligation to call this what it is - the false comfort of appeasement, which has been repeatedly discredited by history."
Obama has said he would personally negotiate with Iran if its leaders abandoned any pursuit of nuclear weapons and their support of violence and also said he would meet Cuban and North Korean leaders.
Hillary Clinton, Obama's rival for the Democratic nomination, says those meetings could be used for propaganda purposes.
Obama, the Illinois senator, said in a statement: "It is sad that President Bush would use a speech to the Knesset on the 60th anniversary of Israel's independence to launch a false political attack."
Al Jazeera's Rob Reynolds said the remarks, which invoked the horrors of the second world war and were made in Israel, "seemed calculated to drive a wedge between Obama and American Jewish voters".
The White House later denied that the US leader's comments were aimed at Obama.
However, John McCain, the presumptive Republican candidate, said he backed Bush's comments.
"Barack Obama needs to explain why he wants to sit down and talk with a man who is a head of a government who is a state sponsor of terrorism that kills young Americans," McCain said.
Earlier McCain had said most US troops could be withdrawn from Iraq by 2013.
|McCain predicted violence in Iraq would|
be much reduced after his first term [File: AFP]
The Arizona senator predicted fighting in Iraq would be "spasmodic and much reduced" by the end of his first term in the White House if he is elected president in November's poll.
"By January 2013, America has welcomed home most of the servicemen and women who have sacrificed terribly so that America might be secure in her freedom," McCain said in a speech predicting the results of his first term in office.
It was the first time the Arizona senator had put a date on when US troops could be withdrawn from Iraq, although he had previously said they could be there for 100 years if necessary.
"The Iraq war has been won. Iraq is a functioning democracy, although still suffering from the lingering effects of decades of tyranny and centuries of sectarian tension. Violence still occurs, but it is spasmodic and much reduced," McCain said.
He said that although the US would still have a troop presence in Iraq, those soldiers would not need a "direct combat role" because Iraqi forces would be capable of providing security.
The conflict in Iraq is unpopular with the US public and McCain's Democratic rivals for the White House have both vowed to begin bringing US troops home soon after either takes office.
McCain has called such promises reckless, rejecting timetables for withdrawing troops from Iraq and has agreed with George Bush, the US president, that changes in troop levels should be determined by conditions on the ground.
The presumptive Republican candidate also predicted that Osama bin Laden, the al-Qaeda leader, would be captured or killed, and that he would have improved military intelligence cooperation with Pakistan.