Making extensive use of Twitter, and deliberately shunning the selection of a single figurehead to lead the movement, the students organized marches and inspired many Mexicans, who saw them as a fresh, grass-roots antidote to the country's old-school parties and powers.
Peña Nieto has promised that his reformed party will hew to democratic principles.
The students were having none of it.
"Alerta! Alerta! Alerta que camina!" they shouted as the clock approached midnight, borrowing a chant used by young activists around the region. "La lucha estudiantil por America Latina!"
Look out. The student struggle for Latin America is on the march.
Their overnight demonstration seemed fueled by anger over an election newly lost, but also by excitement over a voice newly found. One group of torch-bearing protesters set a cardboard television on fire. Another started up a raucous country-and-western line dance.
There were impromptu speeches delivered from the top of a van. There were mothers, like Maria Haydee Cruz, 47, who'd come to support their children. Her daughter Fernanda, 18, imagined a more democratic Mexico not just in electoral terms. A stronger democracy, she said, would come when the poor were better educated — and when the TV wasn't choked with telenovelas.
There were numerous references to Mexico's 1968 student movement, including a wrenching film on the topic, "Rojo Amanecer" ("Red Dawn"), which was projected onto one of Televisa's walls. The '68 movement culminated in a massacre of students by the PRI-led government of the time, and its fallen are considered martyrs.
There were new allies the students have picked up along the way, including members of the Communist Party of Mexico, who hoisted red flags with hammers and sickles; and members of the Mexican Electrical Workers Union, which, to its critics, illustrates the worst of the union movement: greedy, recalcitrant, hopelessly old-school.
There was also a manifesto, read in turns by student leaders from a crowded stage.
The bleakly lyrical document described the "budding hope" of the Mexican people "obliged to scream in the emptiness." Among other things, it called for educational reform, criminal justice reform and a change in the "neoliberal model" for Mexico — the oft-repeated and largely unfulfilled demands of so many Mexican social movements.
A Televisa employee appeared in a third-floor window of the TV network to check the scene below. Dozens of students whistled through their teeth and threw up their middle fingers.
The employee quickly disappeared.
The night belonged both to starry-eyed dreamers and cold realists.
Alexander Vidal, 22, an engineering student at the National Polytechnic Institute, said he thought there was a good chance the election could still be annulled, given the allegations that the PRI engaged in vote buying and exceeded campaign spending limits.
Philosophy student Ernesto Castañeda, 25, didn't think an annulment was likely. Still, he said it was important for the movement to stay alive to serve as a counterweight to the PRI, and an example for the rest of the country.
"It's important that the PRI knows that someone will stand up to them," he said.
With his beard and olive-drab army cap, protester Omar Ortega, 30, looked like he could have been with Guevara in 1959. But Ortega, an attorney who represents rural workers, said he wasn't wedded to a particular ideology. "Just something that respects the rights of campesinos and workers, something that addresses the wealth gap," he said.
"The students aren't looking for power," added architecture student Estefania Aguilas, 23. "We're looking for better conditions for the country."
As the night wore on, the protest began to feel more like a block party.
On Avenida Chapultepec, a ska band played a rocking version of Madness' "Night Boat to Cairo," and a crowd gathered, skanking joyously, passing a Mexican flag overhead. The distraction left big gaps where the human fence was to have been. Some protesters had hoped the ring might also disrupt Televisa's airing of the opening of the 2012 Summer Olympics. But the next day, Televisa would broadcast the opening ceremony, apparently without a hitch.
Down the block, Leo Giron, 26, took note of the holes in the human fence, then shrugged them off with a chuckle.
"Mexico is a mess, generally speaking," he said.
Giron, an economics student, acknowledged that the movement might have problems sustaining itself through six years of PRI rule, perhaps beginning in the early fall, when the students would return to class.
But even if that were to happen, Giron said, he figured they could always reconstitute the movement quickly.
"Now, with just a click," he said, "we'll all be in the streets."
Cecilia Sanchez of The Times' Mexico City bureau contributed to this report.