Final results from all municipal districts outside the capital, and partial results from the bellwether city of Tehran, showed the winners were mostly moderate conservatives opposed to the hardline president, rather than reformists.
If the trend holds, the final results will be an embarrassment to Ahmadinejad, whose anti-Israeli rhetoric and unyielding position on Iran's nuclear program have provoked condemnation in the West and moves toward sanctions at the U.N. Security Council.
Reformists were quick to cry victory.
"Early results show that Mr. Ahmadinejad's list has suffered a decisive defeat nationwide," said the Islamic Iran Participation Front, the largest reformist party, in a statement. "It is a big 'no' to the government's authoritarian and inefficient methods."
The pro-reformist newspaper Etemad-e-Melli published an editorial, based on the unofficial tallies that were circulation on Monday night, that said: "The most important message of Friday's vote was that the people have chosen moderation and rejected extremism."
A freelance Iranian journalist of reformist sympathies, Iraj Jamshidi, described the vote as "a blow to Ahmadinejad," who was elected in June 2005.
"After a year, Iranians have seen the consequences of the extremist policies employed by Ahmadinejad. Now, they have said a big 'no' to him," said Jamshidi.
The incomplete results announced by the Interior Ministry suggested that Ahmadinejad's allies had largely failed to win control of local councils across Iran.
In the key race for Tehran, the largest city, candidates supporting Mayor Mohammed Bagher Qalibaf, a moderate conservative opposed to the president, had taken the lead.
The Interior Ministry said only about 500,000 votes had been counted so far in Tehran, about 20 percent of the expected turnout.
In the southern historical city of Shiraz, as well as in the provincial capitals of Rasht, northern Iran, and Bandar Abbas, southern Iran, not one pro-Ahmadinejad candidate won a seat on the city council.
The partial results also indicated, separately, that reformers might be making a partial comeback, after having been suppressed in the parliamentary elections of 2004 when many of their best candidates were barred from running.
From the results declared on Monday, it looked as if Qalibaf supporters were due to win seven of the 15 seats on the Tehran City Council and that reformists would get another four seats. Three seats would be won by the president's allies and one would go to an independent, according to the early results.
In the elections for the Assembly of Experts, a conservative body of 86 senior clerics that monitors Iran's supreme leader and chooses his successor, opponents of the president also appeared to have done well.
Former President Hashemi Rafsanjani, who lost to Ahmadinejad in the 2005 presidential election runoff, polled the most votes of any Tehran candidate to win a seat on the Assembly of Experts.
By contrast, an ally of the president, Ayatollah Mohammad Taqi Mesbah Yazdi, won an assembly seat with a low vote toll. Yazdi is regarded as Ahmadinejad's spiritual mentor.
In another significant result, Hasan Rowhani, who was Iran's top nuclear negotiator under former President Mohammad Khatami, was elected to the assembly.
Ahmadinejad has repeatedly accused Rowhani of being too soft in negotiations with the Europeans.
Turnout overall was more than 60 percent — substantially higher than that of the 2002 local elections when turnout was about 50 percent, and marginally above that of the presidential elections last year when turnout was 59 percent.
Government officials have so far given no comment on the partial results. They were quick, however, to praise the turnout, saying it would send a strong message to the West that Iran is a democracy.
But a political analyst, Mostafa Mirzaeian, said Iran's political lineup was changing in favor of more-moderate voices — although he stressed those winning were still within the ruling Islamic establishment.
"Results also show that a new coalition has developed between reformers and moderate conservatives, at the expense of hard-line extremists who support Ahmadinejad," he said.
More than 233,000 candidates ran for more than 113,000 council seats in cities, towns and villages across the vast nation on Friday. Local councils elect city mayors and approve community budgets and planning projects.
All municipal council candidates, including some 5,000 women, were vetted by parliamentary committees dominated by hard-liners. The committees disqualified about 10,000 nominees, according to reports in Iranian newspapers.