CARACAS, Venezuela - President Hugo Chavez suffered a stinging defeat in a vote on constitutional changes that would have let him run for reelection indefinitely, the chief of National Electoral Council said today.

Voters defeated the sweeping measures by a vote of 51 percent to 49 percent, Tibisay Lucena said. Turnout was just 56 percent, Lucena said.

Chavez called it a "photo finish" immediately after the results were announced.

The referendum on constitutional changes was a critical test for a leader bent on turning this major U.S. oil provider into a socialist state. An emboldened opposition and clashes during student-led protests in recent weeks had prompted fears of bitter conflict in Chavez's closest race in years.

Earlier yesterday, many of the populist Venezuelan leader's supporters had taken out joyful "victory" caravans.

While initially downcast, as the evening wore on and Chavez postponed a speech set for 7 p.m. local time, the president's opponents expressed growing confidence that they would emerge victorious.

A victory would have given Chavez near-absolute political power. It would have allowed him to continue nationalizing privately owned companies, giving money to the poor, aiding political allies in Latin America, strengthening his alliance with Communist Cuba and sharpening his conflict with Washington - even though his country is the fourth biggest supplier of oil to the United States.

Chavez and his political allies already control Venezuela's Congress, the Supreme Court, and 20 out of 22 governorships.

After the polls closed, it appeared that perhaps only half of the registered voters turned out for the referendum. Many Chavez opponents had called on voters to stay home to avoid legitimizing a result that they believed was preordained.

The government reported arresting 45 people on election-related charges, but, despite a smattering of complaints by the opposition, the election appeared to have been conducted without major controversy.

Low-income Venezuelans said they expected that Chavez, with a victory, would continue showering government benefits on them.

Reynaldo Tarazona, 53, a taxi driver, said he was studying English and tourism free at the Bolivarian University in Caracas established by Chavez.

"Chavez is not only for the poor in Venezuela but for making the entire world more just for the poor," Tarazona said after voting for the proposed changes.

Chavez has spent billions of dollars of Venezuela's oil income in aid aimed at helping the poor throughout Latin America and at building political support from other regional leaders.

Many better-off Venezuelans said that passage of the proposed changes would leave them contemplating whether to join tens of thousands of others who have left the country in recent years rather than be governed by Chavez.

Jose Rodriguez, 48, an official with the Caracas Lions baseball team, said he already had an appointment for today at the U.S. Embassy to apply for a visa to move to South Florida. He is also investigating the possibility of moving with his family to Panama.

"Chavez wants communism, the same system they have in Cuba," Rodriguez said after voting in the upscale Chacao neighborhood. "Private property isn't safe."

In fact, Chavez didn't spell out what he meant when he talked of bringing a "21st-century socialism." He has nationalized the main phone company and a major utility and forced foreign oil companies to give the government a majority stake in their oil fields or leave the country - as ExxonMobil and ConocoPhillips have chosen to do - as the economy boomed on record oil prices.

Among the most hotly debated changes were those that would have allowed Chavez to seek unlimited reelection.

Proposed changes would have reduced the work week to 36 hours, and allowed maids, taxi drivers and other members of the informal economy to begin collecting pensions.

Chavez used the full machinery of government to push for a "yes" vote in the referendum, including blanketing the state TV and radio channels with "yes" ads. He muzzled the main opposition television channel, RCTV, earlier this year by not renewing its operating license.

But poor people in Venezuela say he has improved their lives. The poverty rate in Venezuela declined from 49 percent in 1999, when Chavez took office, to 30 percent in 2006, the U.N. Economic Commission for Latin America and the Caribbean reported last month.

Opponents of the referendum included the Catholic Church hierarchy, the country's biggest business group and human-rights groups.

Changes Chavez Is Proposing

Key constitutional revisions sought by President Hugo Chavez's government:

Lengthening presidential terms from six to seven years and eliminating term limits to allow the president to run for reelection indefinitely.

Allowing the president to handpick provincial and municipal leaders.

Allowing the president to declare a state of emergency for an unlimited period.

Allowing the state to provisionally occupy property slated for expropriation before a court has ruled.

Prohibiting foreign funding for "associations with political aims." Critics warn this could be used to strangle human-rights groups.

- Associated Press

This article contains information from McClatchy Newspapers.