Afghanistan has adopted a new constitution, which both Afghan and international officials hope will heal the wounds from years of civil war. As the country now looks towards its first free elections in more than two decades, Afghan leaders are urging a spirit of unity among the nation's often-fractious ethnic groups.

Afghanistan formally adopted the new constitution Sunday, after weeks of debate and argument, often split along ethnic lines.

Many of the disputes among members of the constitutional assembly, or "loya jirga," pitted the country's ethnic Pashtun majority against the many Afghan minority groups.

Shouting matches and boycotts marked the assembly, as the delegates debated amendments to a draft version of the constitution, drawn up by a panel of experts serving under the transitional government.

The final document tries to smooth over many of the divisive issues. Amendments were added naming each ethnic group and specifying their identity as Afghans.

And while previous Afghan governments designated the majority language of Pashto as the national language, the new constitution also extends this status to Dari, a Persian dialect spoken in the north and west. Other minority languages, such as Uzbek and Nooristani, were given official standing within the regions where they are spoken.

Speaking at the constitutional signing ceremony, transitional President Hamid Karzai called on the nation to come together as a single people. In a gesture to the Uzbek minority, Mr. Karzai, a Pasthun, vowed to learn their language. He added that he hoped the day would come when Pashtuns would be willing to vote for a Dari-speaking presidential candidate.

Much of the ethnic tension can be traced to Afghanistan's civil war during the 1990s, which saw various ethnic-based militias battling each other and forming ever-shifting alliances.

By the end of 1996, much of the country was controlled by the strictly religious Taleban, made up mostly of Pashtuns.

But in 2001, when the Taleban refused to hand over accused terrorist Osama bin Laden to the United States, U.S. forces allied with an ethnic Tajik-led group to overthrow the regime.

With the new constitution now settled, Mr. Karzai and other Afghan leaders are hoping the era of feuding tribes can be forever closed.

In a move to promote this new unity, President Karzai joined an Uzbek militia commander in announcing plans to free hundreds of former Taleban soldiers under a new amnesty plan.

Critics question if the compromises made to achieve consensus on the constitution were genuine enough to sustain peace or were just temporary solutions.

Vikram Parekh, senior Afghan analyst for the Brussels-based International Crisis Group, says loya Jirga members were offered money or promises of government posts in exchange for agreeing on certain issues. "What we have actually seen in practice is ? quite a lot of horse-trading and political deals being struck, delegates being purchased," he said.

Despite the problems, international officials say the new constitution offers war-weary Afghanistan a chance at peace and stability. Lakhdar Brahimi, the departing special U.N. envoy, says the new constitution is a major achievement. "Will it be criticized? I fear it will be," he said. "? But I nevertheless think that the people of Afghanistan are very happy tonight and see in this constitution a new source of hope."

With a constitution now in hand, the transitional government and U.N. officials are now preparing for national elections, scheduled tentatively for June. Poll workers have already begun voter registration, mostly in the east of the country.

Some observers worry that a guerrilla-style insurgency waged by remnants of the Taleban and other anti-government militias could force a delay. But President Karzai, who plans to run for re-election, says he believes the vote will take place on time.