London (CNN) -- American and British leadership of the world remains "essential to the cause of human dignity," President Barack Obama said Wednesday, making a sweeping case for values including freedom and the free market in a speech to a joint session of the British Parliament.
"We must act, and lead, with confidence in our ideals, and an abiding faith in the character of our people," Obama said, even while adding they will "proceed with humility, and the knowledge that we cannot dictate outcomes abroad."
He argued that "the longing for freedom and human dignity" is "universal, and it beats in every heart."
And he linked this year's uprisings against regimes across the Middle East to the fall of Communism in Europe, of white minority rule in South Africa, and of dictatorships in Latin America and Southeast Asia, saying they reflect "a longing for the same freedoms that we take for granted at home."
He also contended that the rise of China, India and Brazil was linked to their acceptance of free markets on the British and American models.
Their ascendance does not mean that Western leadership is in decline, he insisted, saying: "The time for our leadership is now."
His aides billed the address as the centerpiece of his six-day trip to Europe this week.
British lawmakers greeted him with a standing ovation, and applauded his description of himself as the son of a Kenyan cook in the British army who had become president of the United States.
The speech caps a two-day trip to Britain that mixed pomp with politics.
Queen Elizabeth II hosted a state dinner for Obama Tuesday night, where he wore a white tie and tails, while a day later he and David Cameron rolled up shirtsleeves and served burgers and sausages to military service members and their families in the garden of 10 Downing Street.
The president and prime minister turned up the heat on Moammar Gadhafi in a joint appearance Wednesday, with the president saying that "ultimately" the Libyan leader will go.
The United Nations-endorsed mission to protect Libya's people from their leader means making sure Gadhafi "doesn't have capacity to send in a bunch of thugs to murder innocent civilians and threaten them," Obama said.
"I do think we have made enormous progress in Libya. We have saved lives. Gadhafi and his regime need to understand there will not be a letup in the pressure we are applying," Obama said.
But both he and Cameron said it will take time to reach a solution in Libya, which Gadhafi has ruled for 42 years. The nation seems to be grinding into a stalemated civil war.
"We may have to be more patient than people would like," Obama said.
Cameron refused to answer a journalist's question about whether the United Kingdom would send attack helicopters to bolster the military mission in Libya, but said: "We should be turning up the heat in Libya," and vowed to look at "all the options" for doing so.
Obama and Cameron were speaking on a wide range of topics at a news conference in a sunlit garden in London.
Before their meeting with journalists, the two leaders discussed policy in Afghanistan and Pakistan and the Israel-Palestinian conflict, among other issues.
Obama said America's relationship with Britain is "the strongest it has ever been" and said the two nations are committed to working together on global economic recovery and fighting the war on terror.
Cameron said the U.S. killing of al Qaeda leader Osama bin Laden was "a strike right at the heart of international terrorism" and that Britain and the United States must work closely with Pakistan in the future.
"We can defeat al Qaeda," Cameron said.
Obama is in the middle of a six-day, four-nation trip to Europe that began in Ireland and will continue with stops in France and Poland.
On Tuesday the president and first lady toured Buckingham Palace and visited Westminster Abbey, where crowds that had gathered along the roads outside cheered their arrival.
Cameron talked up the two countries' closeness the night before the Obama visit officially began, calling the relationship "essential" and saying there is an "incredible alignment of views" between 10 Downing Street and the White House.
On a less formal note, Obama also joined Cameron in playing table tennis against two students during a visit to a local school. No details on the final score were made public, but the students won handily.
CNN's Richard Allen Greene contributed to this report.