ZUMBAHUA, Ecuador Once a forgotten cluster of mud houses amid windswept peaks, the Ecuadorean village of Zumbahua today boasts a state-of-the-art schoolhouse with large projection touch screens, Internet access in every classroom and lessons in three languages.
Indigenous Kichwa Indians who once stuffed savings under their mattresses now have a bank in town and a free Internet cafe - all paid for by the state.
The treacherous muddy road to the village is being widened and paved, and residents are particularly proud of their local school.
"Education has improved dramatically ... The students know how to work with computers better than kids from the city," headmaster Vicente Caiza said.
Zumbahua is one example of how Ecuadoreans from the Andes mountains to the Amazon jungle have benefited from heavy government spending that will almost certainly win socialist President Rafael Correa a new term in next month's presidential election.
Buoyed by strong oil revenue, record tax collection and steady economic growth, Correa has won broad popular support by expanding access to healthcare, doubling state spending on education and turning rough dirt paths into proper paved roads.
Polls show the U.S.-trained economist turned leftist stalwart is the clear favourite to win the February 17 election. Polls show he has the support of about 50 percent of voters, in spite of opposition criticism that he is an autocrat who has amassed power and persecuted rivals.
A Correa victory would be a boost to the alliance of left-wing Latin American presidents at a time when Venezuela's Hugo Chavez, the bloc's figurehead, is battling to recover from cancer surgery in Cuba.
It could also mean an extension of his fight with foreign investors.
In 2008, Ecuador defaulted on $3.2 billion in bonds despite having funds to make payments. It has also squeezed revenue out of oil companies by forcing them to sign new contracts, and bullied Spain's Telefonica and Mexico's America Movil into paying more for telecoms licenses.
But Correa's anti-capitalist rhetoric belies a pragmatic streak that has allowed him to negotiate with foreign investors when necessary.
His government has offered concessions to Canadian gold miner Kinross as part of negotiations to kick-start Ecuador's nascent mining industry, and it recently called a bidding round for oil blocks to help boost stagnant production.
Though companies are startled by Correa's heavy-handed approach to negotiations, the 49-year-old will need to be more measured in his next term to ensure that Ecuador - locked out of international credit markets - receives the financing it needs.
"We have to make use of our natural resources ... oil and mines to fight poverty, especially among the indigenous people," Correa said at a campaign rally in Zumbahua, as hundreds of supporters wearing wool ponchos and fedora hats shouted "We already have a president, we have Rafael!"
Many people in rural areas support Correa, but want more.
"He has to continue, because we want the hospital that he promised us, and a fire station, and a football pitch," said Luzmilla Cuchiparte, a 24-year-old mother of one who works at Zumbahua's Internet cafe.
Correa lived in Zumbahua for a year in the 1980s when he volunteered with a Roman Catholic organization. He worked at the local barley mill and provided occasional religious instruction.
Most residents then lived hand-to-mouth, but the town is more affluent now and the school shows how much the area has changed. The some 1,000 students from Zumbahua and surrounding villages receive free books and uniforms, and teachers have been trained to use the Internet and computers to teach in Spanish, English and the local Kichwa language.
"We can't turn a blind eye to reality ... They need to learn to use the technology because if they don't they will never be able to travel," said teacher Jakeline Chicaiza.
Correa's government says it has revamped about 5,000 schools and built 18 hospitals and 250 health centres across the nation.
"You will find people throughout Ecuador saying that Correa built that road, or that a school was not there before, or that they now receive cash handouts ... Who can compete against that?" said Paulina Recalde, head of local pollster Perfiles de Opinion.
Such support has helped Correa stay in power for six years, making him the longest-running Ecuadorean president for at least four decades. He backed a constitution re-write in 2008 that allows presidents to serve two consecutive terms. That means that after this poll he cannot run again in 2017.
Rival politicians accuse Correa of undermining judicial independence and of circumventing a hostile legislature by calling a referendum on policy changes in 2011 rather than negotiating with opposition lawmakers.
The father of three is also in a self-avowed "battle" with Ecuadorean media groups, alleging that they are in the pockets of a capitalist elite.
"He's become authoritarian, domineering, arrogant. Even if we were to assume he's done everything well, to protect the (democratic) process he needs to be replaced," opposition candidate and former Correa ally Alberto Acosta told Reuters.
While Correa has broad support, many in this OPEC-member country of 15 million complain that he has raised taxes and failed to fight crime, while corruption cases involving relatives are denting some support.
Companies linked to the president's brother Fabricio Correa were awarded public contracts in violation of anti-nepotism rules, prompting the president himself to annul the deals. A cousin resigned as head of the central bank last month after admitting he had lied about having a university degree in economics.
The opposition, though, is unlikely to cash in on any discontent with Correa because it has failed to unite behind one candidate. Seven opposition candidates are fighting Correa and polls show that his closest rival, former banker Guillermo Lasso, is 31 points behind with 22 percent support.
SOCIALISM VS PRAGMATISM
In recent years, foreign investment has been low compared to neighbouring Colombia and Peru, which have market-friendly governments and huge oil and mining deposits.
Colombia brought in some $13 billion in foreign investment in 2011, and Peru about $7.7 billion, against only about $650 million for Ecuador.
Ecuador failed to save money when oil prices were high, and has been relying on bilateral deals from China for funding. The London-based research company Capital Economics said in a recent report that funding from China could dry up, leaving Ecuador vulnerable.
"Ecuador will need to either boost oil revenues or increase borrowing in order to sustain the current state-led model of development," it said. "A chronic lack of investment has caused (oil) production to stagnate in recent years."
A return to global capital markets would prove very expensive, as Ecuador is considered default-prone.
The country is therefore actively trying to lure more investors. Correa launched an oil-block auction in late 2012 to open up unexplored Amazon areas and also aims to attract miners for untapped metal deposits.
Correa signed Ecuador's first large-scale mining contract with Chinese-owned Ecuacorriente last year, and is in talks with Canadian-based mining firm Kinross over a large gold deposit.
Negotiations with Kinross have been plagued by delays, in part because Ecuador was wants to reap high benefits from the project, but the two sides have said they are closer to a deal after the government agreed to reform the mining law.
Despite his frequent anti-capitalist outbursts, Correa may have no choice but to soften his stance toward investors.
"Correa received a doctorate in the United States, he obtained a masters in economy in Belgium and he studied at a private university. He lives in a dichotomy. He's a revolutionary, but also a pragmatist," said Michel Levi, a foreign affairs professor at Quito's Andina University.
"His pragmatism usually rules."
(Additional reporting By Alexandra Valencia; Editing By Brian Ellsworth, Kieran Murray and David Brunnstrom)
Our top photos from the last 24 hours.