At 1 a.m. the giant monitors in the room switched to the office of the Electoral Council. Tibisay Lucena, the council's head, appeared before the cameras to announce to the nation that the "no" forces had won by the slimmest of margins: 1.4 percent separated the "no" from the "si." A difference of little more than 100,000 votes.
After harnessing every mechanism of government within his reach to win this referendum, Chavez had lost.
A moment later the red shirts stood at attention.
In walked the burly president, a sober and intense look on his face.
His detractors had predicted Chavez would fix the vote if he could not win it honestly and they said disdainfully he certainly could not lose graciously. Yes, Chavez had failed when he tried to orchestrate a 1992 coup attempt, but since becoming president in 1998 he had never faced defeat.
But the wily president who loves to crack jokes had a surprise in store: He accepted defeat graciously.
"This was a photo finish," he said, noting that unlike past Venezuelan leaders he would accept the people's decision. Chavez said he spent four hours agonizing over his options, but ultimately accepted that pushing for a recount could take days and would not be in the best interests of his country.
"To those who voted against my proposal, I thank them and congratulate them," said the president who has rarely shown a humble side.
To his supporters who had been primed for a victory party, he pleaded for calm and restraint. "I ask all of you to go home, know how to handle your victory."
In the streets outside the Presidential Palace the Chavistas, with their red caps, red T-shirts and red flags, walked around in stunned silence.
"It's difficult to accept this," said one woman as she cried, "but Chavez has not abandoned us, he'll still be there for us."
Across the city at the headquarters of the "no" campaign there was jubilation. "This reform was about democracy or totalitarian socialism, and democracy won," said opposition leader Leopoldo Lopez said.
"At least now we have the guarantee that Chavez will leave power," said Valeria Aguirre, a 22-year-old student who had braved tear gas during street protests.
Back at Miraflores, Chavez concluded his remarks by echoing the combative words he uttered after he was jailed for that failed coup in 1992.
"For now, we couldn't," said Chavez. Six years after he first uttered those words he became president of Venezuela.
And then the president stood up and walked to the door. The red shirts applauded. Bolivar stared dispassionately into the chaotic room.
The Associated Press contributed to this story.