President Barack Obama and visiting German Chancellor Angela Merkel both say they believe it is inevitable that Libyan leader Moammar Gadhafi will step down. The two leaders also discussed the uprisings in the Middle East and the state of the world economy.

President Obama and Chancellor Merkel discussed numerous issues during the German leader’s White House visit, including the sometimes contentious topic of Libya.

But both leaders agreed that Libyan leader Moammar Gadhafi’s departure is inevitable. “You are seeing defections, oftentimes of some very high-profile members of the Gadhafi government, as well as the military, and I think it is just a matter of time before Gadhafi goes,” Mr. Obama said.

The president and the chancellor downplayed recent disagreements about the NATO mission in Libya. Germany abstained from the United Nations vote that authorized a no-fly zone over Libya and kept its troops out of the NATO-led mission to enforce it.

Chancellor Merkel said Germany is committed to the Libyan cause. She said her country is “of one heart” with its NATO allies in supporting the operation. But she acknowledged there will still sometimes be differences of opinion.

Mr. Obama praised the contributions Germany has made to the NATO mission, and to the fight in Afghanistan.

“Germany has stepped up and taken additional responsibilities in Afghanistan that have freed up resources for us to be able to conduct our operations in Libya,” he said.

The president and Ms. Merkel both said much more work will be required after Mr. Gadhafi leaves, and they are both prepared to take it on.

The two leaders said they will consult further on Europe’s debt crises, especially in Greece. The president said recovery from what he called the “body blow” of the global recession will take time, and will require patience, not panic.

The German leader’s visit is part of the administration’s recent efforts to assure Europeans of their enduring importance of U.S. allies.