TEHRAN, Iran (AP) – Iranians packed polling stations from boutique-lined streets in north Tehran to conservative bastions in the countryside Friday with a choice that’s left the nation divided and on edge: keeping hard-line President Mahmoud Ahmadinejad in power or electing a reformist who favors greater freedoms and improved ties with the United States.

Turnout was massive and could break records. Crowds formed quickly at many voting sites in areas considered both strongholds for Ahmadinejad and his main rival, reformist Mir Hossein Mousavi, who served as prime minister in the 1980s and has become the surprise hero of a powerful youth-driven movement. At several polling stations in Tehran, mothers held their young children in their arms as they waited in long lines.

“I hope to defeat Ahmadinejad today,” said Mahnaz Mottaghi, 23, after casting her ballot at a mosque in central Tehran.

Outside the same polling station, 29-year-old Abbas Rezai said he, his wife and his sister-in-law all voted for Ahmadinejad.

“We will have him as a president for another term, for sure,” he said.

Voting was extended by six hours to midnight (1930 GMT, 3:30 p.m. EDT) to allow those still in line time to cast ballots.

The fiery, monthlong campaign unleashed passions and tensions. The mass rallies, polished campaign slogans, savvy Internet outreach and televised debates more closely resembled Western elections than the scripted campaigns in most other Middle Eastern countries.

President Barack Obama said Iran’s “robust debate” leading up to elections shows change is possible there, and it could boost U.S. efforts to engage Tehran’s leadership.

In a sign of the bitterness from the campaign, the Interior Ministry – which oversees voting – said all rallies or political gatherings would be banned until after the announcement of results, expected Saturday.

In the only violent episode to be reported, a campaign organizer for Mousavi said about a dozen Ahmadinejad supporters attacked one of his campaign offices in Tehran with tear gas.

No one was injured, and police quickly dispersed the group, said Saeed Shariati, head of Mousavi’s youth cyber campaign. There was not independent confirmation of the attack.

The cyber campaign ran several Web sites and Facebook pages supporting Mousavi. Authorities blocked at least three of them Friday.

The highly charged atmosphere brought blistering recriminations against Ahmadinejad – whom Mousavi said was moving Iran to a “dictatorship” – and a stunning warning from the ruling establishment. The political chief of the powerful Revolutionary Guard warned Wednesday it would crush any “revolution” against the Islamic system by Mousavi’s “green movement” – the signature color of his campaign.

The outcome will not sharply alter Iran’s main policies or sway high-level decisions, such as possible talks with Washington. Those crucial policies are all directly controlled by the ruling clerics headed by the unelected Supreme Leader Ayatollah Ali Khamenei.

But Mousavi has offered hopes of more freedoms at home. If elected, he could try to end crackdowns on liberal media and bloggers and push for Iran to embrace Obama’s offer of dialogue after a nearly 30-year diplomatic freeze. He favors talks with world powers over Iran’s nuclear program, which the United States and others fear is aimed at making weapons. Iran says it only seeks reactors for electricity.

Iranians around the world also voted. In Dubai, home to an estimated 200,000 Iranians, the streets around the polling station at the Iranian consulate were jammed with voters overwhelmingly favoring Mousavi.

“He is our Obama,” said Maliki Zadehamid, a 39-year-old exporter.

With the race too close to call, a top election official predicted turnout could surpass the nearly 80 percent in the election 12 years ago that brought President Mohammad Khatami to power and began the pro-reform movement.

A strong turnout could boost Mousavi. He is counting on under-30s, who account for about a third of Iran’s 46.2 million eligible voters.

Even before the vote was over, Mousavi’s ally Khatami predicted victory.

“All indications suggest that Mousavi has won,” he told reporters.

Ahmadinejad’s supporters were also quick to claim the president had won re-election even before polls closed.

In Tehran’s affluent northern districts – strongly backing Mousavi – voters waited for up to an hour to cast ballots. Mahdi Hosseini, a university student, blasted the firebrand Ahmadinejad for “degrading Iran’s image in the eyes of the world.”

Ahmadinejad brought Iran international condemnation by repeatedly questioning the Holocaust.

In the conservative city of Qom, home to seminaries and shrines, hundreds of clerics and women dressed in long black robes waited to vote in a long line outside a mosque. Ahmadinejad’s campaign has heavily courted his base of working-class families and tradition-minded voters with promises of more government aid and resistance to Western pressures over Iran’s nuclear ambitions.

Mousavi’s rallies in Tehran drew tens of thousands of cheering supporters, who later spent their nights shouting anti-Ahmadinejad slogans and dancing to Persian pop songs on the streets.

He hammered Ahmadinejad for mismanaging the economy, burdened by double-digit inflation and chronic unemployment despite vast oil and gas riches.

Mousavi’s stunning rise also has been helped by his popular and charismatic wife, former university dean Zahra Rahnavard, and their joint calls for more rights and political clout for women. Iranian women work in nearly all levels of society – including as parliament members. But they face legal restrictions on issues such as inheritance and court testimony, where their say is considered only half as credible as a man’s.

For the first time in Iran, the forces of the Web were fully harnessed in an election showdown. That catapulted Mousavi, a 67-year-old former prime minister from the 1980s, into a political star.

On Friday, dozens of Iranians using Twitter posted messages including one that said: “Keep my fingers crossed for green wave to win.”

In a possible complication for Mousavi’s backers, Iran’s mobile phone text messaging system was down. Many Iranians, especially young voters, frequently use text messages to spread election information quickly to friends and family.

“Unfortunately, some of my representatives were blocked from entering polling stations and SMS (text messaging) is also down, which is against the law,” Mousavi said after voting, according to his campaign Web site. “We should not be fearful about the free flow of information, and I urge officials to observe the law.”

Telecommunication Ministry spokesman Davood Zareian confirmed to The Associated Press that the text message system has been down since late Wednesday.

“We are investigating,” he said.

There were no reports of serious problems at the polls. But a top Mousavi aide, Ali Reza Beheshti, said some polling stations in northwestern and southern provinces ran out of ballots, claiming it was a “deliberate attempt by the government to keep people from voting.”

Iran’s elections are considered generally fair, but the country does not allow international monitors. The ruling clerics, however, put their stamp on the elections from the very beginning by deciding who can run. More than 470 people sought to join the presidential race, but only Ahmadinejad and three rivals were cleared.

During the 2005 election, there were some allegations of vote rigging from losers, but the claims were never investigated.

After casting his vote in the white ballot box, the Supreme Leader Khamenei urged Iranians to remain calm.

“As far as I see and hear, passion and motivation is very high among people,” Khamenei told reporters. “If some intend to create tension, this will harm people,” he added.

After voting at a mosque on Friday in eastern Tehran, Ahmadinejad commented on the high turnout.

Interior Minister Sadeq Mahsouli said reports to election officials indicate an “unprecedented turnout will be recorded in the country’s election history,” according to the official IRNA news agency.

Mousavi voted with his wife at a mosque in Tehran’s southern outskirts.

In the southern city of Shiraz, people waited for hours with temperatures nudging 100 degrees (37 C). About 500 people stood in line to vote at the Shahchragh shrine, the burial site of a Shiite saint.

In the southeastern city of Zahedan – where a bomb blamed on Sunni militants killed at least 25 people at a Shiite mosque last month – there were no reports of tensions. The bombed mosque was used as a polling station.

The race will go to a runoff on June 19 if no candidate receives a simple majority of more than 50 percent of the votes cast. Much depends on how many votes are siphoned off by the two other candidates: conservative former Revolutionary Guard commander Mohsen Rezaei and moderate former parliament speaker Mahdi Karroubi.

Brian Murphy reported from Cairo.

AP-ES-06-12-09 1412EDT

Only subscribers are eligible to post comments. Please subscribe or to participate in the conversation. Here’s why.

Use the form below to reset your password. When you've submitted your account email, we will send an email with a reset code.