United Nations Secretary General Kofi Annan and US President George W Bush have welcomed Afghanistan's first post-Taleban constitution.
The loya jirga reflected Afghanistan's ethnic diversity
Mr Annan on Sunday called its approval a "historic achievement", while Mr Bush said it would serve the interests of all Afghans.
The aim of the constitution is to unify an ethnically diverse state.
Agreement was reached after weeks of heated debate that exposed tensions between the country's communities.
The charter agreed by the grand council, or loya jirga, envisages a powerful presidency - in line with the wishes of current leader Hamid Karzai - and two vice-presidents.
President Karzai told the gathering: "There is no winner or loser. Everybody has won."
"I want an Afghanistan where a poor boy from the Baluch tribe can become president," Mr Karzai added, referring to one of the country's clan.
Divisions over official languages and whether ministers could have dual citizenship had delayed the agreement.
Finally deals were brokered behind the scenes to reach Sunday's successful conclusion.
President Karzai has been struggling to quell ethnic rivalry
The overwhelming majority of the 502 delegates meeting in a big tent in Kabul got to their feet, approving the new charter by consensus rather than an actual vote.
Ratifying a new constitution was a key requirement of the Bonn peace accord signed in December 2001, after the Taleban were toppled by the United States.
But the BBC's Crispin Thorold in Kabul says after such a divisive meeting, strong leadership and compromise will be essential to ensure the constitution is accepted by Afghans.
In many ways the hard work begins now with implementation of the constitution, he says.
Mr Annan hailed the approval.
"This historic achievement represents the determination of the Afghan people to see their country transition to a stable and democratic state," the UN secretary general said through his spokesman.
Annan welcomed Afghanistan's 'historic' move
"This is another important step in the peace process that justifies the commitment of the Afghan people and the international community," the statement said.
Mr Bush said: "A democratic Afghanistan will serve the interests and just aspirations of all of the Afghan people and help ensure that terror finds no further refuge in that proud land."
Since the last constitution was drawn up in 1964, Afghanistan has seen Soviet occupation, civil war and five years of hardline Taleban rule.
One of the thorny issues was whether Uzbek should be recognised as an official language.
Some delegates were opposed to the Uzbek language being recognised as official along with Pashto, spoken by Pashtuns who form the majority of Afghans, and Dari, spoken by Tajiks.
There is intense rivalry between the Pashtuns, who have traditionally dominated Afghan political life, and smaller groups like the Tajiks, Uzbeks and Hazaras.
Agreement was reached to have Pashto and Dari as the two official languages. The tongues of other groups will be third official languages in areas where those communities are in the majority.
The divisive issue of the dual nationality of ministers was also resolved.
If a minister in the new government holds citizenship of two countries, it is believed that parliament will vote on that appointment. Many of President Karzai's cabinet ministers hold dual nationality.
UN special envoy Lakhdar Brahimi congratulated Afghanistan on its new constitution but warned "that there is no rule of law in this country yet".
Despite the presence of international peacekeepers in parts of the country, warlords still hold sway in many regions.