Mr. Ahmadinejad spoke Sunday at Valiasr Square in central Tehran, surrounded by thousands of chanting, flag-waving voters in what was clearly intended to be a show of popular support for his victory. But the smell of tear gas and smoke drifted over the cheering crowds. Only a few blocks away, groups of protesters chanted their own slogans against the government, and some of them, bloodied and screaming, could be seen running from police officers armed with clubs.

As night fell, protests resumed in nearby Vanak Square, where the rallies began Saturday, and chants of “Bye-bye, dictator!” and “God is great!” could be heard from rooftops in several areas of the capital.

“No one led these people in the streets,” said Bashu, a 28-year-old opposition supporter who, like many others, was afraid to give his full name. “This is the least we can do; we cannot stay at home and watch them celebrate a fake election.”

He opened his shirt to show long, red welts on his chest where, he said, a Basij militia member had whipped him with a chain. Next to him, a female friend dressed in a black Islamic chador stood with a bloody gash on her forehead that she said had been inflicted by the police.

“We just hope the people of the world hear our voice,” Bashu said. “We haven’t heard from Moussavi; we hear he is under arrest.”

Opposition supporters said they were organizing a major rally to take place Monday in Tehran, though it was not clear whether the authorities would permit it.

The pro-Ahmadinejad rally on Sunday afternoon took place in an atmosphere of extraordinary tension, with riot police officers forming barricades around Valiasr Square and beating people visibly identified with the opposition before they could enter. But inside the barriers, a number of opposition supporters approached a reporter, saying, “They stole the election” or “It is all lies” before scurrying back into the crowd.