CARACAS, Venezuela — It's one of the opposition's favorite tropes: that Venezuela's socialist government is a dictatorship that will stop at nothing to stay in power.
But when crunch time came, President Nicolas Maduro proved critics wrong in their fear he would commit electoral fraud. He accepted a landslide defeat in legislative elections that he says should remove all doubt about the democratic nature of the "Bolivarian revolution" begun by the late Hugo Chavez.
In the run-up to Sunday's vote, the U.S. State Department, echoing the views of much of the Venezuelan opposition, had warned about Maduro's efforts to tilt the electoral playing field in the government's favor by jailing or barring the candidacy of prominent opponents, intimidating voters and keeping out most foreign electoral observers. Democratic president front-runner Hillary Clinton was even more emphatic, accusing Maduro of attempting to "rig" the results.
While many of those criticisms still stand, the warnings of fraud at the polls fell flat: The Democratic Unity opposition coalition secured by a single seat a two-thirds supermajority, surpassing its even most-optimistic forecasts.
Maduro quickly recognized the results and appealed to his supporters for calm, although in the days since the defeat he has hardened his stance. Speaking from Chavez's mausoleum Tuesday night, he said he would fight the agenda of the "bourgeois" congress and protect workers from encroaching capitalism.
Opponents say that given the magnitude of the defeat — the opposition even swept the hillside slum where Chavez is buried — the government had no choice. With voters tiring of rampant crime, triple-digit inflation and widespread shortages, polls for months had been forecasting an opposition victory.
"To spread the idea that in Venezuela elections are transparent and everything works smoothly is a great farce," Gov. Henrique Capriles, who initially contested his narrow loss to Maduro in the 2013 presidential election, told The Associated Press. "The problem for the government on Sunday was that the margin of victory was so great that there was no way for them to snatch the election."
But the government has always prided itself on having one of the most fraud-proof election systems ever, one that former U.S. President Jimmy Carter in 2012 called "the best in the world."
Venezuela is one of the few countries where balloting is 100 percent electronic, and despite considerable scrutiny no credible evidence has emerged that the machines themselves are flawed. The best proof came Tuesday when authorities announced that the last undecided race, the one that gave the opposition enough seats to order a rewriting of the constitution and challenge Maduro's rule, was won by a mere 82 votes.
"This government would no sooner steal an election then they would denounce socialism," said Mark Weisbrot, co-director of the Washington-based Center for Economic and Policy Research. "If they wanted to, they certainly could've cheated them out of their two-thirds majority. All it required was denying them a single seat."
Chavez is one of the few revolutionaries to come to power through the ballot box, in 1998, and his movement has consolidated its grip on power through 20 elections since, all the while voter turnout growing. The socialists have had to concede defeat only once before, in 2007, when Chavez narrowly lost a referendum on expanding his powers — though much of what was rejected he later rammed through government-stacked congress and supreme court anyway.
In the days since the defeat, state TV has been running comments by government officials praising the election as a triumph of democracy.
Opponents say it's an attempt by the government to distract attention from the magnitude of the loss and the opposition's own efforts to ensure against fraud.
After Capriles lost to Maduro in 2013 by fewer than 250,000 votes, many in the opposition awakened to the need for a better campaign operation to compete with the government's well-financed machine. In the months ahead of Sunday's vote, an army of mostly young volunteers fanned out across the country to campaign for opposition candidates and train party monitors how to make sure results were properly audited.
In the end, the extra effort may not have been needed, said Humberto Villalobos, who organized one get-out-the-vote drive, Project Clear Count, which sent some 5,000 paid campaigners to 36 swing districts where the opposition felt there were abnormal voting trends in previous elections.
"There wasn't a significant resistance on the part of the government like we're normally used to seeing," Villalobos said. "You can really sense that the government's base of support is very weak right now."