* Socialist leader faces biggest electoral test in 14 years
* Chavez wants new term to deepen socialism
* Opposition's Capriles promises security and jobs
By Brian Ellsworth and Mario Naranjo
CARACAS, Oct 4 (Reuters) - Venezuelan President Hugo Chavez faces the toughest election of his 14-year rule on Sunday in a vote pitting his charisma and oil-financed largesse against fresh-faced challenger Henrique Capriles' promise of jobs, safer streets and an end to cronyism.
Chavez, 58, staged a remarkable comeback from cancer this year and wants a new six-year term to consolidate his self-styled socialist revolution in the OPEC nation.
Capriles, a boyish 40-year-old state governor, has run a marathon eight-month campaign of house-by-house visits that have galvanized the historically fractured opposition and set up its best shot at the presidency since Chavez's election in 1998.
Defeat for Chavez would defenestrate Latin America's leader of anti-U.S. sentiment while potentially boosting oil companies' access to the world's largest crude reserves.
Victory would allow Chavez to continue a wave of nationalizations and consolidate control over the economy, though a recurrence of his cancer would weaken his leadership and possibly give the opposition another chance.
In torrential rain, red-shirted supporters of the president filled much of downtown Caracas on Thursday for his final rally.
"Chavez will not fail the Venezuelan people," the president said, soaked to the skin in a dark raincoat, on a stage before a sea of fans. "You know that my loyalty to the people almost brought me to the point of death. This is my path."
The former military officer, who survived a short-lived coup in 2002, has developed a near cult-like following by casting himself as a messianic reincarnation of 19th century liberation hero Simon Bolivar while pushing billions of dollars in oil revenue into social programs.
Most best-known pollsters put Chavez in front. But two have Capriles just ahead, and his numbers have edged up in others.
The opposition leader has had more momentum in the final days of the campaign and he is confidently predicting victory.
"The time has come to leave the past behind," the opposition leader told a cheering crowd on Thursday, wrapping up a grueling months-long series of rallies across the country.
The vote is also a cliffhanger for other left-wing governments in the region, from Cuba to Ecuador, who depend on Chavez's discounted oil sales and generous financial assistance.
Seamlessly flipping from jocular prankster to blustering anti-capitalist crusader, Chavez's stories of his poor but happy childhood in a small village have helped him create an emotional bond with poor Venezuelans who see him as one of the family.
For nearly a decade, he has won over voters with free health clinics, subsidized groceries and new universities.
Over the last year he launched programs to give pensions to the elderly, stipends to poor mothers, and tens of thousands of new homes were handed over on live TV to tearful supporters.
Everywhere Chavez has gone on the campaign trail, supplicants have shouted to him asking for help getting a home or a job, or thrust hand-written letters at his staff.
"I work for the state and I'm offended that the loser (Capriles) says we're made to attend and made to wear red!" said Paulo Garralaga, at Thursday's giant rally in Caracas. "I came to support Chavez and to tell him I'm going to vote for him."
Yet day-to-day issues are overshadowing ideological fervor.
Nationalizations have weakened private enterprise and given party apparatchiks growing control over jobs. Weak law enforcement, dysfunctional courts and plentiful arms have made Venezuela more violent than some war-zones. Frequent blackouts are an annoying reminder of squandered oil income.
"Each one of you should make a list of the problems that you have, and ask yourself, how many of those problems has this famous revolution solved for you?" the wiry and sports-loving Capriles intoned at one of his final rallies.
The business-friendly law graduate easily won an opposition primary election in February and has united anti-Chavez parties like no one before him. His rallies have been notably more energetic and swollen with ecstatic fans in the final weeks.
Sporadic violence has dogged the campaign, with three Capriles activists shot dead last weekend, demonstrating the volatile atmosphere and potential for violence around the vote.
Capriles has promised to shed Chavez's doctrinaire vision of a state-led economy for a pragmatic balance between social welfare and free enterprise. He calls himself an admirer of Brazil's market-friendly left, which has pulled close to 35 million people into the middle class over a decade.
Chavez has made ample use of state resources to bolster his campaign, speaking for hours about the virtues of socialism in "chain" broadcasts that all public access channels are required to run. The electoral authority has demurely declined to regulate such broadcasts, calling them "institutional" messages.
Despite complaints of Chavez's advantages, opposition leaders say they see little risk of fraud during the electronic balloting itself. There will be no formal international observation of the vote, though local groups will be present and voting centers will have witnesses from both sides.
Chavez's frequent vote victories over the last 14 years have undermined shrill opposition criticism that he is a dictator.
But he has never had to hand over power. Though he accepted defeat in a 2007 referendum on his proposed overhaul of the constitution, in less than a year he used special decree powers to make many of the changes that voters had rejected.
A win for Chavez could prompt a sell-off of Venezuelan bonds, which have risen steadily since June and jumped in recent weeks as investors bet on a possible Capriles win.
Venezuela's heavy borrowing has made its debt among the most actively traded emerging market bonds - creating an odd romance between Wall Street and one of the world's most virulent critics of capital markets.
Capriles is promising to improve the country's finances by cutting wasteful expenditures and halting politically motivated gifts to allied left-wing and anti-American nations.
"President Chavez, I thank you for what you have been able to do," the opposition leader said at his final campaign rally, in Lara state, in a rare direct use of his opponent's name.
"With the greatest respect: the time has come to move forward, and you will not be able to stop the people's advance."
* To follow us on Twitter: @ReutersVzla