* Opposition will make inroads after 2005 boycott
* President's Socialist Party seen keeping majority
* Chavez praises rivals for taking part in polls (Updates with Chavez voting, paragraphs 2-3)
By Daniel Wallis
CARACAS, Sept 26 (Reuters) - Venezuelans voted for a new parliament on Sunday with President Hugo Chavez expected to keep control of the National Assembly in a poll that tests his support ahead of the next presidential election in 2012.
Wearing a tracksuit top in the red, yellow and blue of the Venezuelan flag, Chavez arrived to vote at a school in the 23 de Enero slum in a modest red sedan that he drove himself.
"All those who come out to vote know their vote will be respected," he told reporters, adding that he was happy the opposition had agreed to take part. "Those who are against, those who are in favor, let us all vote," he said.
Chavez is not on the ballot, but his larger-than-life personality has dominated the campaigns -- and exposed stark political differences in a country with vast oil and mineral wealth and a huge gap between rich and poor.
Opposition parties in South America's biggest oil producer are guaranteed to make big gains after they boycotted the last legislative election five years ago.
The focus is on whether they can take more than a third of the 165 seats up for grabs, which would mean the socialist president would need support from his foes for major changes to laws or to make appointments to important institutions.
For full election coverage, click [ID:nVENEZUELA]
From before dawn, Chavez supporters had woken residents in sprawling shantytowns and elsewhere with fireworks, horns and loudspeakers proclaiming: "Let's vote for the president!"
The former paratrooper is hailed by fans as a champion of the poor, but denounced by critics as a boorish dictator. His popularity is in the 40 percent to 50 percent range -- well below his highs of previous years but probably enough to ensure his ruling Socialist Party retains a majority.
More than 17 million people are registered to vote. The polls are due to close at 6 p.m. (2230 GMT), with the first results expected in the following hours.
"This revolution must be saved, it cannot be lost. You must vote with your conscience," Aura Querales, a 63-year-old pensioner wearing a bright red T-shirt, told Reuters after casting her ballot in the west of the capital Caracas.
In addition to the president's polarizing personality, the peaceful campaign has focused on Venezuela's shocking crime statistics and its dire economic situation. Sky-high inflation has worsened a second year of recession.
A big win would boost Chavez ahead of the 2012 presidential poll, when he will run for re-election in what would be his 14th year in power. In that time, he has become one of the world's most recognizable -- and controversial -- politicians.
VOTING QUEUES FROM AMAZON TO ANDES
The 56-year-old was first elected president in 1998, six years after leading a failed coup that won him national prominence. He later launched his self-proclaimed "Bolivarian Revolution" -- named for independence hero Simon Bolivar.
According to polls, the Socialists are a couple of percentage points ahead of a newly united opposition umbrella group, Democratic Unity. Combined with changes to voting rules and the electoral map that favor the government, analysts say, that means Chavez's party is favorite to win.
Opponents, however, say there is a wave of disenchantment with the president that will prove the polls wrong.
Dora, a 33-year-old Petare hairdresser who did not want her second name used, said she was woken up before 4 a.m. by noisy "Chavista" neighbors. She was voting for the opposition.
"Since the attempted coup of '92, I've never liked that man. He is violent and I don't trust him," she told Reuters.
In television images of polling stations from rural villages in the Amazon jungle to Andean villages and the slums of Caracas, small and orderly queues formed at the polls.
The armed forces said they had closed the border with Colombia until 8 p.m. on Sunday (0030 GMT on Monday) "to avoid any problems that could hinder the electoral process."
Tensions spiked between the Andean neighbors in early August after U.S. ally Colombia accused Chavez of tolerating leftist guerrillas on his territory. Chavez briefly cut diplomatic ties in protest, but relations have since improved.
Investors are paying close attention to the vote, particularly because debt issued by the government and state oil company PDVSA offers very high yields for those willing to bear what some consider a significant chance of default.
Venezuela's yield spread over U.S. Treasuries remains the widest among nations listed on JP Morgan's Emerging Markets Bond Index Plus (EMBI+) 11EMJ.
Its benchmark dollar-denominated 2027 global bond VENGLB27=RR rose 6.73 percent to 70.56 on Friday from 66.13 two weeks ago, thanks, analysts say, to the nonviolent run-up to the vote and increased investor appetite for risk.
Some market players hope for opposition gains because they are wary of nationalizations by Chavez that have put a wide swath of the economy under state control, including multibillion-dollar oil projects run by U.S. majors. (Additional reporting by Andrew Cawthorne, Frank Jack Daniel and Deisy Buitrago; editing by Mohammad Zargham and Jackie Frank)