WASHINGTON—The opposition made important gains in the recent state and local elections in Venezuela. It will now have some political strongholds from which to resist attempts by Hugo Chavez to seek a constitutional referendum that would make him president for life.

Although the government won 17 of the 22 governorships in play, the opposition won in four of the five most important races: oil-rich Zulia, the industrial powerhouse of Carabobo, the Miranda region around the capital city, and Caracas, the capital itself. Add to that the other states where the government lost—Tachira, next to the border with Colombia, and Nueva Esparta—and it is quite clear that the opposition, which is not represented in Congress and was until last week confined to two states, will now have something of an institutional power base.

The environment in which these victories were obtained could not have been worse for the opposition. Five of its best candidates, including Caracas politician Leopoldo Lopez, whose approval ratings were higher than Chavez’s for most of the year, were disqualified through various legal maneuvers. In recent weeks, as it became apparent that the government was in trouble in key states, Chavez led a personal campaign of intimidation, threatening to jail the outgoing governor of Zulia, who was running for mayor of that state’s capital, and warning the voters of Carabobo that he would send in tanks if the opposition prevailed.

Nationwide, the opposition won 52 percent of the popular vote against the government’s 48 percent. This is of particular significance because Chavez, who lost a referendum last December that would have given him the ability to seek permanent re-election, intends to put his megalomaniacal designs to the vote once again. Given Sunday’s results, in all likelihood he would lose a new referendum.

None of this, of course, should make us lose sight of the fact that, 10 years after coming to power, the Venezuelan autocrat still enjoys strong popular support, in part because of the deeply ingrained culture of populism the government has tapped with its Bolivarian rhetoric, its use of oil money, and the demonization and persecution of potential challengers. A recent poll by Datanalisis gave Chavez a 58 percent approval rating—a substantial recovery from 35 percent early this year, when scarcity, inflation and crime turned many government supporters in the barrios of Caracas and other cities against the government.

But the cost of Chavez’s resurgence will be dear—economically as well as politically. His last budget was based on the presumption that the average price of a barrel of oil would be $90. In reality, the drop in demand linked to the global recession has brought Venezuelan crude down to $40. While it is true that the price of oil was $8 when Chavez came to power, suggesting that even a $30 to $40 barrel would guarantee him an amount of revenue he could not have even dreamed of when he was planning his takeover of the country’s institutions, there is no question that the international crisis will limit his ability to bribe a large part of society through political patronage.

Which is why Chavez needed a resounding victory Sunday in order to ensure that he could call a constitutional referendum before the consequences of the global recession corrode the populist system on which his power rests. We can still assume that he will try again sooner rather than later because the longer international economic conditions prevail, the chances of him winning are very dim.

One election will not be enough to get rid of Chavez anytime soon. But it means the opposition will be able to continue its political war of attrition against the government’s juggernaut with renewed confidence. It is tragic that an entire generation of Venezuelans has had to devote a good part of its best years to resisting domination by an autocrat. But that is nothing compared to the frustration Chavez must feel after 10 years of not being able to establish a second Cuba in Latin America.