Moments after Mahmoud Ahmadinejad's underdog victory four years ago, the streets in scruffy south Tehran were in full celebration for their native son.

Shops offered free sweets and tea. Women shouted prayers from open windows. The khaki-shirted basiji — the street vigilantes of the Islamic Revolution — chanted slogans and thanked God that a true ideological ally was now president.

The views toward him now are much more nuanced, conflicted and increasingly critical over issues that range from Iran's gasping economy to his combative style with the West. How he responds could largely set the tone for the June 12 vote between Ahmadinejad and three challengers: a fellow hard-liner who led the powerful Revolutionary Guard, and two perceived reformers.

The election comes amid high-stakes challenges in Iran's relations with the West and its own region.

The clock is ticking on Washington's offer for dialogue on issues including Iran's nuclear program. Iran's test firing of a missile with a range that covers the entire Middle East, including Israel and U.S. bases, also was seen as a pre-election display of military muscle.

In practical terms, the outcome will likely make little difference because all major decisions are handed down directly by the Supreme Leader, Ayatollah Ali Khamenei, or through the Revolutionary Guard. However, the election has strong symbolic value and will determine whether Ahmadinejad is seen as a suitable front man for the brinksmanship ahead with the Obama administration.

Ahmadinejad can still count on the twin pillars of his image — populist hero and champion for Islam — to swing him substantial support. But his uncomplicated messages of sharing the wealth and fighting for the faith that worked in 2005 no longer resonate the same way.

"The West is, as expected, looking at this election through a geo-strategic lens," said Mehrzad Boroujerdi, a researcher in Iranian affairs at Syracuse University. "In Iran, it's about things like jobs, rising prices and the country's isolation."

There's no real Persian equivalent for the American political axiom, "It's the economy, stupid." There might be after this race.

Promises of oil revenue handouts and more jobs were the backbone of Ahmadinejad's campaign that catapulted him from the relative obscurity of Tehran city hall. It's now his potential weak link.

The country's balance sheets look as gloomy as ever, with double-digit unemployment and at least 25 percent inflation. Last year's record oil prices brought no serious windfalls because OPEC giant Iran lacks enough refineries to meet domestic demand and must still import fuel.

Add this to economic sanctions that could grow even tighter if Tehran snubs Washington's offer to open negotiations over Iran's nuclear program, which Iran claims seeks only peaceful reactors but Israel and the West worry could develop atomic weapons.

"Well, let's just say it's not the easiest time in Iran these days," said Ilan Berman, an Iranian affairs specialist at the American Foreign Policy Council.

Ahmadinejad's opponents have pounced. His conservative challenger, Mohsen Rezaei, has accused Ahmadinejad of pushing Iran's economy to "the edge of a precipice." The leading reformist candidate, Mir Hossein Mousavi, has sounded like Ahmadinejad did four years ago: vowing to fight corruption and fix the economy.

Ahmadinejad has responded with his populist instincts on a huge scale. His office has sharply boosted its yearlong program of handing out checks of up to 1 million rials, or about $100, in poor neighborhoods and villages. Earlier this month, it announced that the payouts would expand to another 5.5 million people in rural areas throughout Iran. Many of the same regions are also in line for free potatoes, oranges and tomatoes.

The government claims it's simply trying to distribute surplus crops, but it's an easy target for critics. On Monday, students at an event for Mousavi chanted "Death to potatoes" — a play on the "Death to America" slogan common at hard-line rallies since the 1979 Islamic Revolution. And Mousavi has hammered the theme that Ahmadinejad's fiery approach has left Iran increasingly isolated.

"I voted for (Ahmadinejad) four yours ago because I saw him to be a man of the people. Now, I'm convinced that he is a populist who has taken Iran decades back," said Reza Shams, who runs a Tehran shirt design company.

Such comments — which are increasingly heard — could portray Ahmadinejad as politically wounded and vulnerable. That, however, underestimates his political skills and affinity with the priorities on the Iranian street.

Ask Zeinab Hosseini, a housewife receiving government assistance of the equivalent of $100 a month.

"He remains a man of the people. He cares for the poor. Ahmadinejad is a hero," she said.

To Western sensibilities, he can appear doltish in his ill-fitting suits, nerdy wind breakers and assertions such as gays do not exist in Iran. And dangerous: calling for Israel's destruction, cozying up to Venezuela's Hugo Chavez and refusing to back down on nuclear fuel enrichment programs.

But to his supporters in Iran, Ahmadinejad can be pitch perfect at times. His diatribes against the West are not seen as provocative finger-pointing, but rather an expression of historical grievances such as a U.S.-backed monarchy and a British dominance of Iran's oil industry for decades. And many conservative Iranians interpret his calls for Israel's demise — and even questioning the extent of the Holocaust — as a fair shot because of the decades of suffering for Palestinians.

The nuclear standoff, however, is perhaps Ahmadinejad's biggest crowd pleaser in Iran. His proclamations that Iran would never surrender its technological advances rings well even among his critics as a matter of national pride.

"Ahmadinejad is a brave man who stood up to the West and established Iran as a nuclear country ... He has brought dignity and pride for Iranians," said hard-line lawmaker Fatemeh Ajorloo.

Even his personal style — which can seem eccentric in the West — is almost an ideal blend of piety and humility for his main constituency of working-class urban neighborhoods and provincial towns and villages. How much is stagecraft and how much genuine is impossible to say.

Ahmadinejad's first appearances in Tehran after his 2005 election seemed strained by a dead-end speaking style of asking rhetorical questions without hinting at answers. Yet a different voice began to emerge as he attended global forums such as the U.N. General Assembly. He quickly learned how to deliver the sharp sound bite.

In New York last September, he accused "a few bullying powers" of trying to stop his country's legal right to a peaceful nuclear energy program. Last month at a U.N. conference in Geneva, he called Israel the "most cruel and repressive racist regime."

"As a result of his rapid rise in domestic politics, Ahmadinejad is overly confident that his political skills will carry him through controversial issues in the world arena," said Eric Rosenbach, executive director at Harvard University's Belfer Center for Science and International Affairs. "But his hubris leads to ridiculous policy positions that have seriously degraded Iran's standing in the international community."

Obama opened the door wider for relations in a video message to mark the Persian new year in March. But little progress has followed, partly because of a wait-and-see atmosphere on both sides because of Iran's elections.

Ahnadinejad's fortunes could ultimately rest on how Khamenei views him.

"Does he see him as a nonstarter with face-to-face meetings with America because of being a Holocaust denier, calling for Israel's destruction and so forth?" said Alex Vatanka, a senior Middle East analyst at Jane's Information Group. "If he sees it this way, then maybe the regime will look for a softer face such as Mousavi."