On Feb. 12, Henrique Capriles Radonski, a 39-year-old Venezuelan state governor, won a primary election to become the opposition’s candidate against Hugo Chavez in October’s presidential election. He won 1.8 million of an astonishing 3 million votes — double the turnout predicted by most analysts.

The next day, Capriles, a devout Catholic, was greeted by a commentary on the government-run Web site of Venezuelan National Radio titled “The Enemy Is Zionism.” Capriles, it explained, is the descendant of Jews. (In fact, his grandmother was a Holocaust survivor who emigrated from Poland to Venezuela.)

“In order to understand the interests embodied” by Capriles, the commentary declared, “it’s important to know what is Zionism, the Israeli ideology that he sneakily represents. . . . It is, without doubt, an ideology of terror, of the most putrefied sentiments of humanity; its supposedly patriotic impetus is based in greed.” And so on.

“Zionism,” it concludes, “is owner of the majority of the financial institutions of the planet, controls almost 80 percent of the world economy and virtually all of the communications industry, in addition to maintaining decision-making positions within the U.S. Department of State and European powers.”

Thus began the latest — and what will surely be the ugliest — political campaign by Chavez, a ruler who has served as a friend in need to Moammar Gaddafi, Bashar al-Assad and Mahmoud Ahmadinejad — and who now is facing his own homegrown democratic uprising. But Venezuela’s spring differs from those of Libya, Syria or Iran: Instead of pouring into the streets, Venezuelans — fed up with the chaos and violence of Chavez’s 13 years in power — are marching to the polls and trying to restore the country’s crippled and compromised institutions.

The opposition Capriles now heads has learned lessons that might benefit some of the revolutionaries of the Middle East. It tried and failed to oust Chavez with mass demonstrations and strikes; it foolishly boycotted elections it believed would be unfair; it indulged in endless internal quarrels. The result was the entrenchment of a strongman who has thoroughly wrecked what was once Latin America’s richest country and who now presides over the highest inflation and murder rates in the Western Hemisphere, shortages of basic goods and power, and a drug-trafficking industry whose kingpins include the defense minister.

The opposition could have turned savage; instead it grew civil. Capriles, lanky and somewhat wonky, has insisted on pursuing power peacefully and by electoral means, even when the playing field is tilted. In 2004 Chavez jailed him on bogus charges; he won acquittal and in 2008 stunned Chavez’s hand-picked candidate for governor in Miranda, the populous state that surrounds Caracas. Now some pollsters are giving him even-money odds of beating Chavez himself, if the votes are counted fairly. His campaign has focused not on the caudillo but on the country — how he would begin to piece the economy and democratic institutions back together, while preserving social programs for the poor. His model, he says, is Brazil’s social democratic hero, former president Luiz Inacio Lula da Silva.

Chavez has responded by importing the rhetoric of the Holocaust-denying Ahmadinejad, whom he recently welcomed to Caracas. He has tried to seize the ballot papers from the opposition primary, probably in order to identify and punish those who participated; such an operation targeted signers of a 2004 recall petition.

Meanwhile he is pouring borrowed money into the economy in a frantic effort to buy back support. The government budget calls for a 46 percent increase in spending this year. The state oil company borrowed $17.5 billion last year and is expected to sell another $12 billion to $15 billion in bonds. There is also a $30 billion credit line from China, to be paid back with discounted oil sometime in the future.

For Chavez, the future beyond October may not matter much. Operated on for cancer in Cuba last June, he has never disclosed the details of his illness; more than one foreign report suggests that he suffers from an incurable malignancy. Photos of his puffy face are in keeping with reports from opposition sources that he is relying on massive steroid injections to keep himself upright between now and October.

A lot of Venezuelans worry that one way or another, the country is headed for an implosion. A Capriles win could be contested by pro-Chavez generals; if Chavez wins and dies, a vacuum will open. Either way the economy will likely crash, once the pre-election spending binge ends.

That’s why the very orderliness and moderation of Capriles and the opposition coalition are so striking. Theirs is not so much an ideological or partisan crusade as a desperate effort to restore a semblance of political and social order to a country that is unraveling — a grasp at the modernity they glimpse in Brazil and Chile. Are they too late? The next seven months will tell.