In a splendorous ceremony atop a hill that was once the center of the Roman empire, 25 European heads of government signed the European Union's first constitution Friday, but for it to take effect, all their countries must ratify it. Approval is far from certain, observers and politicians said.

The constitution was the result of more than two years of negotiations to move the E.U. states toward closer cooperation, faster decision-making and a bigger world role. But the constitution does not create the federal super state that some Europeans would like.

If ratified, the constitution will provide for selection of a continent-wide president and foreign minister, an increase in the powers of the European Parliament and strengthened influence for the union in such areas as agriculture, foreign trade and the environment. But individual countries can secede from the union and opt out of foreign policy decisions. The E.U. president would have no executive powers, which would remain with national leaders.

Italy's Prime Minister Silvio Berlusconi, host for the signing, told European leaders that "never in history have we seen an example of nations voluntarily deciding to exercise their sovereign powers jointly in the exclusive interest of their people, thus overcoming age-old impulses of rivalry and distrust."

The dignitaries were gathered in a room inside a palatial city hall and museum complex on Capitoline Hill. A marble statue of Julius Caesar dominated the room. A band played the "Ode to Joy" from Beethoven's Ninth Symphony.

"For centuries, the story of Europe was one of enemies and their wars. It has become a story of friends and their partnership," declared the Netherlands' prime minister, Jan Peter Balkenende, after the gathering had moved to yet another Capitoline hall, this one featuring a monumental bust of the Emperor Constantine and a statue of Pope Innocent X.

The selection of Rome as site of the signing ceremony was aimed at giving the event historical heft. Not only was Rome the center of Europe's first great stab at unity two millenniums ago, the city was also the site for the 1957 birth of the European Economic Community, forerunner of the E.U. Italy, Germany, France, Belgium, the Netherlands and Luxembourg signed the original Treaty of Rome.

It is left up to each E.U. member to decide how to ratify the treaty, which can be sunk by just one rejection. Berlusconi pledged to take it to his cabinet in the late afternoon -- usually downtime in a country that regards Friday as a leisurely warm-up to the weekend -- and to call a parliamentary vote by year's end.

But at least 10 countries have indicated they will hold referendums on the document, and ratification is considered an uphill battle in several nations. European surveys show a decline in positive feelings toward the E.U., with many people critical of ceding decisions to officials at E.U. headquarters in Brussels. Debate over the constitution is especially intense in Britain, Denmark, Poland and the Czech Republic. The ratification deadline is two years.

President Jacques Chirac of France has pledged to hold a referendum by next summer, but this week Prime Minister Jean-Pierre Raffarin suggested there could be a delay. French opinion is deeply divided, polls show. "It will be very difficult to do it in six months," Raffarin said.

"The signing of the European Constitution does not mean we have crossed the finishing line," said Romano Prodi, who is finishing a term as president of the European Commission, the E.U.'s executive arm. "In the months ahead, the governments of the union's 25 member states will need to employ their best endeavors to persuade their parliaments and citizens to ratify the new constitutional treaty. We cannot take these decisions for granted."

Prodi was scheduled to give way on Nov. 1 to Jose Manuel Durao Barroso, the former Portuguese prime minister who is his designated successor as commission president. The body's functions include managing subsidies and trade and regulatory policies, enforcing E.U. laws and keeping tabs on national budgets to see that they conform with E.U. limits on deficits.

Durao Barroso's accession was delayed because the European Parliament rejected his entire team of 24 commissioners over the nomination of one, Rocco Buttiglione, as head of the commission on justice. During a parliamentary hearing, Buttiglione labeled homosexuality a sin and said, in effect, that a woman's place was in the home. Opponents contended that with views like that, he could not uphold E.U. anti-discrimination standards. Supporters, including the Vatican, said he was barred because of his Roman Catholic beliefs.

Durao Barroso indicated he would shift the portfolios of nominees and try again. "I will go back to some of the prime ministers so that I can get the best choices," Durao Barroso said at a news conference.

Spain's Prime Minister Jose Luis Rodriguez Zapatero, left, and Foreign Minister Miguel Angel Moratinos sign the European constitution beneath a towering statue of Pope Innocent X in a historic hall on Capitoline Hill in Rome.