CARACAS, Venezuela (AP) — Opponents and supporters of President Hugo Chavez held their final rallies on Thursday ahead of legislative elections that both of Venezuela's political camps view as a critical test.

Venezuelans on Sunday will elect 165 members of the National Assembly, which has been almost entirely pro-Chavez since opposition parties boycotted the last vote in 2005 citing concerns about possible irregularities.

Chavez led two campaign rallies in provincial cities, calling for an overwhelming win and saying the vote is an important step on his path to running for re-election in 2012.

A crowd of supporters cheered when Chavez took the stage in the city of Barquisimeto, started bouncing up and down while swinging his arms like a boxer and said: "We're going to give them a beating."

The socialist leader denounced his opponents as "the Yankee empire's candidates" and — as he has often alleged during his 11-year presidency — accused them of being in cahoots with his critics in Washington.

The opposition, which has smoothed over divisions and fielded a unified slate of candidates, is going into the elections aiming to win a majority — or at the very least to prevent Chavez from keeping a two-thirds majority in the unicameral legislature.

The opposition has voiced concerns that Chavez's candidates enjoy advantages, including benefiting from public funding and ample TV time. Those concerns remain but should not weigh on Sunday's results, said Ramon Guillermo Aveledo, leader of the opposition coalition Democratic Unity Table.

"It's a fight of David against Goliath, and it's going to end as the Biblical fight did," Aveledo told The Associated Press in an interview.

Aveledo said the opposition will accept the election results as long as they are transparent.

"Where the result is transparent, we recognize it. Where it isn't, we don't," Aveledo told the AP. "If they cheat us, we don't recognize (the result)."

Both political camps will have members at each polling station keeping an eye on the voting.

About 17.5 million Venezuelans are registered to vote, and more than 300 candidates are competing in the elections.

Chavez's supporters rode through Caracas in caravans with horns blaring, hanging out open windows and waving the red flags of the president's socialist party.

Opposition candidates held other rallies on the last day of campaigning.

"We want to build a Venezuela that makes us feel proud," opposition candidate Maria Corina Machado told a rally of several thousand people in the city of Los Teques, located on the outskirts of Caracas. "Those of us who believe that is possible are the majority, and we're going to achieve it together."