On September 28, the people of Ecuador will be asked to vote on a new constitution, drafted over the past eight months by an elected constituent assembly.
The new constitution is the centrepiece of the political project of Ecuador's left-wing President Rafael Correa.
Correa, a former finance minister and economist, was elected in late 2006 promising to lead a "citizens' revolution" that would refound the country and overcome poverty through a "socialism of the 21st century".
The draft constitution — Ecuador's 20th since winning independence in 1830 — was passed by the assembly on July 24 by 94 votes to 32.
A number of the 444 articles echo demands raised by the country's powerful social movements over the past decade.
It expressly forbids foreign military bases on Ecuadorian soil, backing up Correa's pledge to close the unpopular US airforce base at Manta, on Ecuador's coast, when its contract expires next year.
Another article recognises unpaid domestic work as productive labour, making those who perform it eligible for social security.
Undocumented immigrants — particularly refugees — will no longer be considered "illegal", granting them more rights to stay and work in the country. Compulsory military service will be abolished, and, with some exceptions, genetically modified seeds will be banned.
Some of the new articles may be contentious in the heavily religious country, such as granting equal legal rights for same-sex relationships and guaranteeing "reproductive rights" to women. Both of these articles have drawn strong criticism from the Catholic Church.
If approved, the constitution would make Ecuador the second Latin American country, after Uruguay, to legalise same-sex unions.
The elements of the new constitution most criticised by the right-wing opposition parties, however, are those which threaten their control over Ecuador's political and economic spheres. In the political sphere, the president will be able to run for a second consecutive term and to dissolve congress and order new elections once during a term.
In the economic sphere, there are articles securing greater state control over strategic economic sectors, especially mining, and providing for the redistribution of idle land.
Mining has long been a source of conflict between the government on the one hand and the country's social movements and the indigenous organisations on the other.
Ecuador is heavily dependent upon mining for revenue, but decades of corruption and pollution has led to an environmental crisis that has been called an "Amazonian Chernobyl".
Pollution by oil, cyanide and other toxins caused by Western corporations such as Chevron and Encana, as well as by the decrepit infrastructure of the state-owned oil company Petroecuador, have caused birth defects, deforestation, cancer and other horrific diseases throughout much of Ecuador's Amazonian region.
Correa's government is currently supporting a class action against Chevron for the damage it has caused, but much of it is irreversible.
Conflict in this area has continued under Correa. Ecuador's sluggish economy — the slowest in the western hemisphere — depends upon the sector for revenue, much of which is now being put into social spending.
While the new constitution will ensure that communities affected by mining — most of them indigenous — be consulted about the projects beforehand, this provision is a compromise.
Most representatives of affected communities and the social movements, as well as many in Correa's own governing alliance, wanted the affected communities to be given a veto over exploration in their areas.
After a series of often-violent confrontations between anti-mining protesters and police, CONAIE — Ecuador's main indigenous federation, largely responsible for the overthrow of Ecuador's last three elected presidents — broke off communication with the government on May 12, and declared itself to be in opposition to Correa.
Their critique of the government for continuing harmful economic polices of previous governments was ratified by many of Ecuador's main social movements later that month.
The Correa government has also taken some highly original initiatives on the environment, however, launching a project for the oil-rich yet pristine rainforest of the Yasuni-ITT National Park that would see international donors pay Ecuador to prevent drilling for oil in that area.
Ecuador has also started proceedings in the International Court of Justice in the Hague to force Colombia to stop the fumigation of coca plantations near the border, which poisons Ecuadorian communities and ecosystems.
Other measures supported by the social movements did not make it to the final draft, however. Long-time Correa-ally Alberto Acosta unsuccessfully proposed a ban on open-pit mining, as well as including water rights.
Acosta, a left-wing environmentalist with strong ties to the social movements, was elected as president of the assembly as a member of Correa's Country Alliance.
However, he resigned on June 23 after a number of proposals — including to extend the deadline for drafting the constitution — were publicly opposed by Correa.
Polls place Acosta a close second to Correa as most popular politician in the country. His departure is seen by many as a blow to Correa, despite his declaration of loyalty to the project.
Another contentious point in the draft constitution makes Spanish and the indigenous languages Kichwa and Shuar "official languages of intercultural relation", but keeps Spanish as the only "official language of Ecuador".
The refusal to grant equal status to Kichwa, spoken by nearly 40% of the population, has been loudly criticised by CONAIE.
Also, while the draft constitution makes reference to the "plurinational" nature of Ecuador's population, over 40% of which is made up of the country's 17 indigenous groups, this only came after a fierce debate, in which CONAIE accused Correa of "racism" for opposing its inclusion.
Despite their criticisms, however, CONAIE and other social movements are likely to come behind the "yes" vote in September, while remaining critical of the shortfalls of the Correa administration.
In August, Ecuador's Supreme Electoral Court will distribute one million copies of the draft charter throughout the country, as part of a popular education campaign in the lead up to the referendum. The campaign, in the face of opposition led by the powerful private media hostile to Correa's project, will be a serious test for "citizen's revolution".