MOUNT VERNON, Virginia (CNN) -- President Bush and French President Nicolas Sarkozy on Wednesday called on Pakistani President Gen. Pervez Musharraf to hold planned elections and to step down from the military.

French President Nicolas Sarkozy joined President Bush in demanding elections in Pakistan.

"My message was very plain, very easy to understand: The United States wants you to have the elections as scheduled, and I want you to take the uniform off," Bush said of his telephone conversation with Musharraf earlier in the day.

On Saturday, Musharraf imposed an emergency order in the country -- suspending the constitution and arresting hundreds of human rights activists and lawyers -- in what he said was a necessary move to fight terrorism.

Sarkozy agreed that the elections must take place as scheduled.

"We need to have elections [in Pakistan] as swiftly as possible," he said. "This is a country of 150 million people, which happens to have nuclear weapons. This is very important for us that one day, we shouldn't wake up with a government, an administration in Pakistan which is in the hands of the extremists."

Responding to a reporter's question about the absence of Iraq in his speech to Congress earlier in the day, Sarkozy said he sent his foreign minister there recently to show solidarity with the Iraqi people.

"France wants a united Iraq. It's in no one's interest to see Iraq dismantled," the French president said.

Sarkozy pledged Wednesday a renewed alliance and friendship between his country and the United States. Watch Sarkozy explain how France will stand by the U.S. »

In his speech to a joint meeting of Congress, the French president promised to stand firm with Washington on the war in Afghanistan and against Iran's nuclear program.

Facing problems back home as he tries to implement campaign promises on immigration and economic issues, Sarkozy recalled the long history of friendship between the two countries.

"In times of difficulty, in times of hardship, America and France have always stood side by side, supported one another, helped one another, fought for each other's freedom," he said.

In his first few months in office, Sarkozy has been at pains to show he is an ally of the United States, backing Bush's hard-line stance on Iran's nuclear program and attempting to heal the wounds over his country's opposition to the Iraq war.

Lawmakers greeted Sarkozy's entrance into the chamber with a standing ovation and lengthy applause -- evidence of the renewed hopes for Franco-American relations.

"Let me tell you solemnly today: France will remain engaged in Afghanistan as long as it takes, because what's at stake in that country is the future of our values and that of the Atlantic alliance," he said. "For me, failure is not an option. Terrorism will not win because democracies are not weak, because we are not afraid of this barbarism. America can count on France."

Sarkozy also promised to help in the fight against the proliferation of weapons of mass destruction, citing Iran's nuclear program.

"Let me say it here before all of you: The prospect of an Iran armed with nuclear weapons is unacceptable," he said.

"The Iranian people is a great people. It deserves better than the increased sanctions and growing isolation to which its leaders condemn it. Iran must be convinced to choose cooperation, dialogue and openness. No one must doubt our determination."

But Sarkozy made it clear that while his government will work with Washington on many issues, the relationship will be on an equal footing.

"I want to be your friend, your ally and your partner. But a friend who stands on his own two feet. An independent ally. A free partner," he said. Watch Sarkozy define what friendship means to France »

Sarkozy also addressed the situation in the Middle East, calling on Israeli and Palestinian leaders to "risk peace. And do it now."

"The status quo hides even greater dangers: that of delivering Palestinian society as a whole to the extremists that contest Israel's existence; that of playing into the hands of radical regimes that are exploiting the deadlock in the conflict to destabilize the region; that of fueling the propaganda of terrorists who want to set Islam against the West," Sarkozy said. "France wants security for Israel and a state for the Palestinians."

He called on Washington to pay attention to the dollar's latest woes, to stand with Europe in the fight against global warming and to take the lead in shaping reforms in the United Nations, the World Bank and the Group of Eight nations.

"Our globalized world must be organized for the 21st century, not for the last century. The emerging countries we need for global equilibrium must be given their rightful place," the French president said.

He closed his comments with a request for the United States to "trust Europe."

"In this unstable, dangerous world, the United States of America needs a strong, determined Europe."

Sarkozy said he sees a need in the future for Europeans to "shoulder a growing share of their defense."

"All of our allies, beginning with the United States, with whom we most often share the same interests and the same adversaries, have a strategic interest in a Europe that can assert itself as a strong, credible security partner," he said.

Sarkozy's speech to Congress marks the first address by a French leader since President Jacques Chirac's appearance in 1996. E-mail to a friend

CNN's Jill Dougherty contributed to this report.

All About Nicolas Sarkozy • France