As thousands of protesters laid siege to a three metre-high fence sealing off the centre of Quebec, 34 leaders representing North, South and Central America and the Caribbean hammered out a framework for a free trade bloc for the American hemisphere by 2005.
The three-day summit chaired by Canadian Prime Minister Jean Chretien ended yesterday, with agreement that only countries with democratic governments and independent judiciaries could be members of what would be the world's biggest economic community.
The move, inspired by Mr Chretien and US President George W. Bush, is designed to discourage the return of military dictatorships in Latin America. It also effectively excludes Fidel Castro's Cuba.
As the leaders spent the weekend in closed retreat at the Citadelle, a 19th century fortress used by Winston Churchill and Franklin Roosevelt during second World War summits, 30,000 anti-globalisation protesters besieged the city.
All day Saturday and into Sunday morning militants attacked the perimeter fence through clouds of tear gas, but an army of 6,000 police from all over Canada prevented any demonstrators from penetrating the summit area comprising much of the upper city.
A total of 403 protesters were arrested and dozens hurt by gas canisters and rubber bullets. Forty-six police officers were injured, one seriously. Most of the demonstrators were peaceful but late on Saturday a hard core of militants threw petrol bombs at the fence.
Mr Bush, who has made a free trade agreement of the Americas his major foreign policy issue, described to the summit his vision of "a fully developed hemisphere bound together by democracy and free trade".
But while the American leaders made eloquent appeals for democracy during the televised opening ceremony on Saturday, the tone was quite different when the doors were closed.
Television cameras were turned off but officials overlooked a French translator's microphone and the session was broadcast by Radio Canada. This revealed the concerns of developing countries who said while democracy was a laudable goal, every effort must be made to ensure that poor people were not left behind. President Hugo Chavez of Venezuala said they could not talk about democracy if land was concentrated in the hands of a small number of people and Paraguay President Luis Gonzalez Macchi urged solidarity with the poor.