President George W. Bush and Prime Minister Ehud Olmert bid each other farewell on Monday, expressing confidence in an eventual Mideast peace deal that won't materialize on either of their watches.

Bush and Olmert met for more than an hour at the White House as their time in office winds to a close. Bush's two terms end Jan. 20. Olmert plans to resign amid corruption charges and will step down after a successor is chosen on Feb. 10.

Bush, speaking to reporters before their talks in the Oval Office, said Olmert kept his word "and in international politics, that's important."

"We've been through a lot together during our time in office," Bush said. "We strongly believe that Israel will benefit by having a Palestinian state, a democracy on her border that works for peace. ... It's not easy to try to change the paradigm, and I understand that."

"I just want you to know that I believe that vision is alive and needs to be worked on."

Olmert said history will owe Bush a debt of gratitude for setting the region on the path to an accord.

"A two-state solution is the only possible way to resolve the conflict in the Middle East," Olmert said.

"I'm sure that when the history books will be written, the contributions that you made to the safety and security of many people will be greatly appreciated."

Neither Bush nor Olmert, however, can put an Israeli-Palestinian peace accord in their legacy book.

Just a year ago, at a summit Bush hosted in Annapolis, Md., Olmert and the Palestinian president, Mahmoud Abbas, resumed peace talks after a seven-year standstill. The three set an ambitious target to have a final peace deal by the end of 2008. But despite a lot of talk, Bush's two trips to the region and eight more by Secretary of State Condoleezza Rice, all have acknowledged the year-end target will not be met.

Bush administration officials say some progress has been made.

"We're much farther along the road than we otherwise would have been" without the Annapolis meeting, White House deputy press secretary Tony Fratto said Monday. "And I think we're much farther down the road than most people give the Palestinians and the Israelis credit for.

"Now, we do have the elections coming up in Israel, and obviously that will delay or throw off the process a bit."

The ongoing threat from Iran's nuclear program also was a central topic of their discussion.

Israel sees it as the biggest national security threat, and also has been provoked by Iranian President Mahmoud Ahmadinejad's repeated calls for the destruction of the Jewish state.

The UN Security Council has imposed three rounds of economic penalties on Iran, which insists its nuclear program is peaceful and designed to produce energy. Both the U.S. and Israel say they hope diplomatic pressure resolves the standoff, but have not ruled out military action.

A report this past week by the International Atomic Energy Agency said Iran was stonewalling attempts to monitor its nuclear activities. And intelligence assessments from Israel, obtained Monday by The Associated Press, said weakening international pressure on Iran will embolden the government in Tehran to make major strides next year toward developing a nuclear bomb, something Israel thinks Iran will be capable of building by 2010.

Earlier Monday, the Israeli leader had breakfast with Rice and national security adviser Stephen Hadley and met with Vice President Dick Cheney. Bush, Olmert, first lady Laura Bush and the Israeli prime minister's wife, Aliza, dined privately at the White House.

Olmert to Rice: EU, U.S. officials starting to talk with Hamas Olmert warned Monday that European and American officials were making efforts to maintaining direct contact with Hamas, thus bypassing Western demands that the militant Palestinian group recognize Israel and renounce violence before direct talks could begin, Army Radio reported.

In a meeting with U.S. Secretary of State Condoleezza Rice ahead of White House talks, Olmert went on to say that achieving a Palestinian statehood deal he and Bush failed to seal should be a main goal of the Obama administration.

A senior Israeli official described the meeting, saying "the prime minister stressed the importance that the Annapolis process be continued by the next U.S. administration and Israeli government."

Olmert, who will be leaving office after a Feb. 10 parliamentary election and formation of a new government, was due to see Bush at 6 p.m. for talks Israeli officials said would focus on the peace process and Iran's nuclear ambitions.

The United States, Israel and the Palestinians have all acknowledged they will not have a peace accord in place before Bush vacates the White House in January, missing a target date set at the Annapolis peace conference a year ago this week.

U.S. president-elect Barack Obama, who visited Israel and the West Bank in July, pledged at the time - in an apparent jab at Bush's last-minute efforts to secure peace - not to "wait a few years into my term or my second term if I'm elected" to press for a deal.

Although Olmert has vowed to pursue peace until his last day in office - a pledge his spokesman said he repeated to Rice - public interest in Israel in the lame-duck leader's policies is waning as the election campaign gathers speed.

Opinion polls in Israel show former Prime Minister Benjamin Netanyahu's right-wing Likud party leading the ruling centrist Kadima faction in the election.

Netanyahu has said he would focus peace efforts on shoring up the Palestinian economy rather than on territorial issues, a policy that could spell the end of the Annapolis process.

As his term winds down, Olmert has been increasingly vocal about what he sees as the need for Israel to relinquish nearly all of the land it captured during the 1967 Six-Day War in return for peace, while retaining major Jewish settlement blocs.

Palestinian officials said the commitment came too late.

Olmert's successor as Kadima leader, Foreign Minister Tzipi Livni, has not voiced support for the outgoing prime minister's position.

After his talks at the White House, Olmert and his wife Aliza will dine with the president and first lady Laura Bush. Olmert is scheduled to fly home on Tuesday after meeting with U.S. Jewish leaders.