First results were expected in the early hours of today, with definitive results unlikely before tonight at the earliest.
For the first time in its 65-year history, the ruling Institutional Revolutionary Party (PRI), which has relied on fraud to retain unbroken power, is not assured of victory. Ernesto Zedillo, 43, the party's candidate to take over from Carlos Salinas de Gortari, led most opinion polls. But many Mexicans do not trust them any more than they believe Mr Salinas won cleanly six years ago.
The presidential race is between the Stand-In, the Chief and the Engineer. Mr Zedillo became the stand-in candidate after the March assassination of Mr Salinas's hand-picked candidate, Luis Donaldo Colosio. His main rivals are Diego Fernandez de Cevallos, 53, of the conservative and strongly Catholic National Action Party (PAN), known as el Jefe (the Chief), and Cuauhtemoc Cardenas, 60, of the left-wing Democratic Revolution Party (PRD). Mr Cardenas, the son of a former president, Lazaro Cardenas, is known as el Ingeniero (the Engineer). The six other presidential candidates have little chance of winning more than a small number of votes.
At stake are the 500 lower-house seats, 96 Senate places, the 66-seat Mexico City assembly and the governorship of the state of Chiapas, where Zapatista guerrillas staged an uprising in January. The PRI has always controlled both houses of parliament and has never lost Chiapas. But the two main opposition parties could end the PRI's legislative control and the PRD has a chance in Chiapas.
Mr Salinas promised a clean election. More than 70,000 observers, including hundreds of foreigners, watched balloting at many of the 96,000 polling stations. Touchy about its sovereignty, the government insisted that the foreigners were not formal observers, but 'visitors'. Among them were the Republican Senator John McCain of Arizona and representatives of the Carter Centre.
The new Federal Electoral Institute (IFE) is largely independent. But its leader and the man in charge of the electoral register are PRI officials. Foreign observers believe that even if the computer results are clean - a supposed collapse of the computer system in 1988 turned a lead by Mr Cardenas into victory for Mr Salinas - ballot-stuffing or multiple- voting in remote areas is possible.
There were more than 45 million eligible voters among the 90- million population. The abstention rate has often been about 40 per cent. It may be lower this year due to the closeness of the race.
If Mr Zedillo wins with about 40 per cent of the vote, he could be sworn in as president on 1 December. But the result would mean most voters had rejected the PRI. Mr Zedillo would find it difficult to rule without sharing power with the second-placed party. Regardless of the outcome, the end of the system under which the PRI and government were synonymous, appears to be close.
The country appeared calm as voting started. But there is potential for trouble. Mr Cardenas told his supporters to take to the streets in towns and villages at noon yesterday, 'to celebrate victory'. Effectively he was rallying support, in case he loses and decides that the result is a fraud.
The government has shipped in tanks and armoured cars bought recently from Belgium and Russia, apparently anticipating post-election violence.
Troops fanned out around Mexico City airport and police made special searches of passengers arriving from countries where terrorists have tended to operate - including the Middle East, South America and Spain. To dampen passions, a so-called 'Dry Law' - banning the sale of alcohol - went into effect at midnight on Friday and ended at midnight last night. The United States has put its border patrols on alert, saying there could be a massive influx of Mexicans, including many claiming political persecution, in the event of post-electoral confusion.
The US embassy in Mexico issued a statement calling on Americans to stay away from demonstrations in case they get 'inadvertently trampled on, or victimised by criminal or unruly elements, operating under cover of crowds'.