CARACAS, Venezuela, Monday, Dec. 3 — Voters in this country narrowly defeated a proposed overhaul to the constitution in a contentious referendum over granting President Hugo Chávez sweeping new powers, the Election Commission announced early Monday.

It was the first major electoral defeat in the nine years of his presidency. Voters rejected the 69 proposed amendments 51 to 49 percent.

The political opposition erupted into celebration, shooting fireworks into the air and honking car horns, when electoral officials announced the results at 1:20 a.m. The nation had remained on edge since polls closed Sunday afternoon and the wait for results began.

Image Mr. Chávezs supporters at Miraflores Palace in Caracas after the results were announced. Credit... Jorge Silva/Reuters

The outcome is a stunning development in a country where Mr. Chávez and his supporters control nearly all of the levers of power. Almost immediately after the results were broadcast on state television, Mr. Chávez conceded defeat, describing the results as a “photo finish.”