The Mexican general election of July 2, 2006, was the most hotly contested election in Mexican history and as such, the results were controversial. According to the Federal Electoral Institute (IFE), the initial "Quick Count" determined the race was too close to call, and when the "Official Count" was complete, Felipe Calderón of the right-of-center National Action Party (PAN) had won by a difference of 243,934 votes (or 0.58%). The runner-up, Andrés Manuel López Obrador of the left-of-center Coalition for the Good of All (PRD, PT, Convergence), immediately challenged the results and led massive marches, protests, and acts of civil resistance in Mexico City. On August 9, while protests continued to expand, a partial recount was undertaken by election officials after being ordered to do so by the country's Federal Electoral Tribunal (TEPJF, sometimes referred to by the acronym of its predecessor, the TRIFE). The tribunal ordered the recount of the polling stations that were ruled to have evidence of irregularities, which were about nine percent of the total."Mexican recount begins as protests expand". CBC News, 9 August 2006.

On September 5 the tribunal declared that Felipe Calderón met all the constitutional requirements in order to be elected, and was declared president-elect."Proponen magistrados declarar Presidente electo a Calderón". Carlos Avilés and Arturo Zárate. El Universal, 5 September 2006. Some civil resistance acts led by Andrés Manuel López Obrador were maintained in an attempt to encourage a change in the country's opinion, as well as other activities such as a documentary by Mexican filmmaker Luis Mandoki.

Elections and results On Sunday July 2, 2006, Mexico held its first presidential election of the post-PRI (Institutional Revolutionary Party) era. Media polls had predicted a very tight race.

To understand some of the allegations and controversies, it will be useful to know some of the details of how the votes were counted and how the partial results were reported.

Vote counting Since the 1997 federal elections, elections in Mexico had been overseen by the (now dissolved) Federal Electoral Institute, known by its Spanish acronym IFE. Prior to 1997, elections were run by the federal government's Secretaría de Gobernación (interior ministry). The law governing elections was the Federal Code for Electoral Institutions and Procedures, the COFIPE."Código Federal de Instituciones y Procedimientos Electorales" at the Instituto de Investigaciones Jurídicas of UNAM. The COFIPE was amended after the election of 2006; references to articles in this section refer to the COFIPE as it stood during the election in 2006, unless explicitly noted otherwise.

Under the law then in force, each polling place was manned by randomly selected citizens from the corresponding district, who formed the Mesa Directiva (Directing Committee). They received a training session from the IFE prior to the election. In addition to the polling place officers, each party, coalition, or alliance participating in the election could name up to two observers and one alternate for each polling place (article 198 of the COFIPE).

In order to vote, citizens were required to present a valid credencial para votar con fotografía (voter identification card, with photograph). The card was checked against the official voter list for the polling place, which contained facsimiles of each card. The voter was then given the blank ballots and directed to the booth to mark them secretly. People unable to read or who had a physical impairment could be accompanied by a single person they themselves designated. The citizen then folded the ballots, and deposited them in the corresponding ballot boxes. Then, the Secretary of the Directing Committee would write "voted" in the entry corresponding to the citizen in the official voter list, the identification card was marked and returned to the voter, and their right thumb marked with indelible ink (article 218). The party and coalition representatives voted in the booth to which they are assigned, and were logged in special entries in the voter list. During the voting, the party representatives could file complaints in writing, which were received by the Chair and logged by the Secretary (article 221). A specified number of "special voting places" were also installed for people voting outside their polling place. Their thumbs were inspected before allowing them to vote, and the data logged. They were allowed to cast votes in all elections corresponding to both the location of the special voting place and their own registry; for example, if they were voting in their state but outside their district they were allowed to cast votes for senator and president, but not for district deputy (article 223).

Voting stopped at 6 pm or whenever anyone who was in line to vote at 6 pm was done voting (article 224); the poll could be closed earlier only if all members of the Directing Committee agreed that all registered voters had cast their vote. Once the polling place closed, the Directing Committee was in charge of counting and recording the votes, in the presence of the party representatives (article 229 of the COFIPE). After the counting was over, the totals for each candidate, the total of write-in votes, the total of annulled votes, and the total of left-over blank ballots were recorded in the Acta de Escrutinio (official tally sheet); in addition, any incidents that occurred during the voting or counting would be described in writing (article 232). Finally, every member of the Directing Committee and every party representative present were required to sign the tally sheet; the latter were allowed to sign under protest and explain their reasons, if they so desired (article 233).

A file was then made for the polling place. The file contained a copy of the log (Acta de la jornada electoral), a copy of the signed tally sheet, and a copy of any protests filed. Separate packets contained the unused ballots, the annulled ballots, and the valid votes. A separate envelope contained the list of voters. Finally, all files were placed together in a sealed packet; the sealed packet was then signed by every member of the Directing Committee, and any party representative who so desired (article 234).

Each party representative then received a copy of the official tally sheet; the representative was then required to sign a proof of receipt. On the outside of the sealed electoral packet a transparent envelope containing a signed copy of the official tally sheet was placed (article 235). The chair of the Directing Committee then placed an enlarged copy of the final tallies in a visible location outside of the polling place; this copy was supposed to be signed by the Chair, and could be signed by any other members of the Committee and party representatives who so desired (article 236). Finally, the polling place was then officially closed, and the Chair of the Directing Committee (with any party representatives who so desired) delivered the sealed packet and documentation to the District Office, where the official count (see below) began some days later. Polling places next to the District Office were required to deliver it "immediately" upon closure of the polling place. Urban polling places located away from the District Office were required to deliver the packets within 12 hours, and rural polling places within 24 hours of closure (article 238).

PREP The IFE was mandated by law to provide quick information and a fast estimate of the electoral results, but it had no authority to determine the outcome of the election.

The IFE had two systems in place. One is the Programa de Resultados Electorales Preliminares (Preliminary Electoral Results Program, known by its initials PREP); the second was the Conteo Rápido (Quick Count). Although the two were often confused, they were in fact two separate systems.

The PREP is a mechanism to make public the results of the election.:: PREP - Programa de Resultados Electorales Preliminares :: As soon as the polls closed and the votes were tallied in each polling place, a copy of the acta de escrutinio (the official tallies from the polling place) was sealed in a special envelope with a transparent window.:: PREP - Programa de Resultados Electorales Preliminares :: It was then sent to a Center for Information Collation and Transmission (Centro de Acopio y Transmisión de Datos or CEDAT) that was located in the corresponding electoral district. There, the information was captured and transmitted to the central offices of the IFE for public dissemination. The information was then backed up and made public on the IFE website and a number of mirrors. The PREP is not an estimate or a statistical exercise, but rather the full unofficial returns from each polling place, as they were computed at the polls on the day of the election. They are not official returns, since the tallies must be certified by the District's Electoral Council before they become official. The PREP would continue to collate data until all polling places reported or until the early morning hours of Monday July 3. If the tally sheets contained certain inconsistencies (e.g., blank entries rather than zeros, illegible totals, etc.), then they were reported separately, under the heading of Irregular, as per prior agreement between the parties, and were not added to the totals as they were received. Where possible, their results were added when the final report was made on Monday morning.

In the PREP, election results were posted as they were being received by the IFE. Calderón quickly overtook a very early lead by López Obrador and kept a diminishing lead until the end.

Quick count The Conteo Rápido (Quick Count), on the other hand, was a statistical attempt at predicting the trend of the election. On the night of the election, a random selection out of a representative sampling of 7,636 polling places was to be selected, and statistical analysis would then be performed in an attempt to predict the winner. The agreement regarding the Conteo Rápido was as follows: IFE .: Programa de Acompañamiento Ciudadano (PAC) :. elección 2006 Using the results that had been obtained by 10:00 pm on July 2, the technical committee would perform a statistical analysis (described below). Once it was finished, the committee would give Luis Carlos Ugalde, the president of the IFE, a report with one of four recommendations/conclusions: (i) that there was sufficient clarity and assurances as to which political party would get the most votes; (ii) that more time was needed to obtain further data that would clarify the conclusions; (iii) that the race was too close to call; or (iv) that there was an insufficient scientific basis to apply the tests on the samples obtained. Ugalde would then make the conclusions of the report public; again, as per prior agreement, in case (i) the winner would be announced; in case (ii), an announcement would be made to that effect and the announcement of the conclusion postponed for no more than two hours; and in case (iii) the race would be labeled "too close to call" and the precise results (i.e., who was ahead according to the analysis) would not be revealed. According to the official reportMicrosoft PowerPoint - Informe Comite CR.ppt [Sólo lectura it had been decided in advance that a winner would be announced and the election called only if the separation between the intervals corresponding to the first two places was greater than 0.6%.