By a vote of 455 to 6 with 6 abstentions, a special session of the lower house of Congress passed an absentee voting scheme already approved by the Senate. President Vicente Fox has pledged to sign it into law.
As the congressmen cast votes on the electronic board, dozens of visiting migrants waved flags and sang the Mexican national anthem.
"Today is historic," said Maria Sara Rocha, of the Intuitional Revolutionary Party, or PRI. "It's a triumph."
The support came despite fears expressed by members of all major political parties that the country's notoriously slow and corrupt postal service will handle mailing out ballots.
"Voting by mail has its advantages and disadvantages, but it is the consensus that has been agreed upon," said Juan Jose Garcia of the leftist Democratic Revolution Party.