Voters turned out in overwhelming numbers Sunday to decide whether to recall President Hugo Chavez, a populist whose rule has bitterly divided this major oil-producing country and strained relations with the United States.

The heavy turnout appeared to reflect a widespread desire by Venezuelans to end a three-year standoff between Chavez and his opponents that has periodically exploded in violence, including a short-lived coup in 2002.

Voters waited patiently at polling stations for as long as 10 hours, many huddling under umbrellas to ward off a blazing sun. The delay stemmed from the use of time-consuming fingerprint scanners aimed at deterring fraud, and from the massive electoral turnout, the highest in 30 years. With lines stretching for a mile or more, voting hours were extended beyond the initial 4 p.m. until midnight.

Opposition activists were jubilant about the vote and set off fireworks early Monday. Although election rules barred them from publicizing exit polls, they appeared on television Sunday night, predicting a win.

"All the tendencies indicate we're on the point of winning a democratic victory," said Felipe Mujica, a spokesman for the opposition coalition.

But a Chavez election official, Samuel Moncada, predicted that those opposed to the recall would prevail.

"We're winning," he said late Sunday. Hundreds of Chavez supporters gathered at the presidential palace, blowing whistles and chanting slogans in a victory celebration.

The referendum was the culmination of years of efforts by the opposition to oust Chavez, a charismatic former army officer who swept into office in 1998 pledging to replace the country's scandal-tainted two-party system with a government catering to the poor.

Chavez is a hero to many of the country's destitute. But critics, who include many in the middle and upper classes, accuse him of ruling in an inept, authoritarian style and fomenting class hatred.

The significance of the vote goes well beyond Venezuela. This South American country is the fourth-largest supplier of oil to the United States and has been a traditional U.S. ally. But the Bush administration has been irked by Chavez's close ties to Cuban President Fidel Castro and his support for left-wing movements in the hemisphere. Chavez, in turn, has been deeply suspicious of the Bush administration since it quickly recognized the coup in April 2002 that briefly deposed him.

Chavez, 50, voted in western Caracas on Sunday and promised to accept the results of the referendum.

"All those who were saying the dictator Chavez wouldn't agree to a vote. . . . Well, here's the proof," the president said.

Chavez has vowed that if he lost the recall, he would be a candidate in elections that would be triggered within 30 days.

Chavez supporters as well as opponents warned before the referendum that they would not accept the results if there was fraud, raising fears of violence or a disruption of oil exports. The slow pace of voting, caused mainly by mechanical delays in the scanning of fingerprints outside the voting booths, fanned concerns of irregularities, both among voters and opposition activists.

"We want to vote! We want to vote!" chanted citizens at polling stations in Caracas and other cities.

Former president Jimmy Carter, who led a team of international observers, said there were no major problems. The balloting was mostly peaceful, except for an incident in Caracas in which a gunman opened fire on voters, killing a 28-year-old woman and injuring 12 others, news services reported.

The opposition coalition collected more than 2 million petition signatures to trigger the recall vote two years before the end of Chavez's term. Under the terms of Venezuela's constitution, the opposition needs to surpass the 3.76 million votes Chavez received in his 2000 reelection in order to oust him from office. About 14 million people are registered to vote in the country.

The opposition also had to outpoll the millions of Chavez supporters who flocked to the polls Sunday, eager to retain a president who has used the country's soaring oil revenue to provide health, education and food programs for the nation's poor majority.

William Sutherland, 40, a university student, was among those who rose before dawn and stood in line for hours under a punishing sun to back Chavez.

"He's the only president who has paid attention to all Venezuelans," said Sutherland, dressed in a T-shirt depicting revolutionary hero Che Guevara.

Venezuela was blanketed with red "No" posters opposing the recall, and Chavez's well-organized supporters turned out with whistles and red shirts. However, Chavez's popularity has clearly diminished since he was first elected, during years of severe economic recession linked to the country's political instability.

Carmen Diaz, 43, an office worker voting in the same working-class neighborhood as Sutherland, said she wanted to recall the president because of high unemployment and what she called frightening levels of crime. "We have to get rid of this guy. Every day we're worse off," she said.

Chavez burst onto the national scene in 1992 when he launched an unsuccessful coup. Six years later, he won office in a landslide victory and set out to remake the country, charging that its then 40-year-old democracy was a sham benefiting only the "rancid oligarchy."

Chavez launched a self-declared "revolution" that included a new constitution and the use of soldiers to carry out social projects in poor areas. But his overtures to Cuba, and his concentration of power in the presidency, achieved in part through referendums, alarmed the country's business elite and middle class.

Violence has erupted periodically, with 19 people killed in an anti-Chavez protest shortly before the 2002 coup, and 12 people slain during anti-government riots in March. The coup, and a three-month general strike launched by the opposition in December 2002, have contributed to a sharp decline in the economy.

Economic growth in Venezuela has picked up this year, thanks to a 43 percent rise in world oil prices. While many Venezuelan businessmen are ardent foes of Chavez, he still enjoys support from some international investors, particularly in the oil sector. They had expressed hope that the president would defeat the recall, fearing that fresh elections that would be triggered by a successful recall would only produce more turmoil.

Former U.S. president Jimmy Carter, at the polls in Caracas, leads a team of observers monitoring the recall referendum in Venezuela. Hundreds of Venezuelans line up to cast their ballots on whether to keep the country's populist president, Hugo Chavez, in power.