Thousands of people gathered at a government-organised rally in Tehran's central Vali Asr square, while a similar-sized demonstration was held by opposition supporters in the city's north.
State television footage showed a crowd of thousands of flag-waving protesters at the pro-government rally, while the media was banned from filming the opposition protests.
Al Jazeera's Teymoor Nabili, reporting from Tehran, said the pro-Ahmadinejad rally in the south was a much more organised affair than the smaller anti-government rally that took place just a few kilometres away.
Pro-government demonstrators have demanded the government crack down on the opposition, while their anti-government rivals have protested that their votes were "stolen" in the presidential election.
Seven people were killed on the fringes of a massive opposition rally a day earlier, state media reported.
Mousavi had urged his supporters to stay away from Tuesday's rally in the same area amid fears of further clashes.
In a message posted on his website, he asked his supporters to "exercise self-restraint".
But thousands of his supporters wearing wristbands and ribbons in his green campaign colours marched on Tuesday to the state television IRIB building in northern Tehran, which was ringed by riot police, witnesses said.
Some supporters were sending messages to others to meet again on Wednesday for a rally at Tehran's central Haft-e Tir square.
Sadegh Zibakalam, an Iranian political analyst, said that the government had arranged its protest on Tuesday as a response to the anti-government movement.
"The government doesn't want to appear as being too soft - that's why they called this rally today and asked its supporters to come to the square where Mousavi's supporters had decided to gather," he told Al Jazeera.
"By arranging these crowds, the government is making two points. It wants to demonstrate that it is firm in dealing with this crisis, [and] on the other hand they have been called [on] by the pro-government crowd to crack down.
"In a sense, it is a justification for the seven people who were killed last night."
The rallies came just hours after Iran's powerful Guardian Council said it could order a partial vote recount if it found irregularities.
The legislative body has ruled out annulling the disputed poll, but the council's move appears to be a first concession by authorities to the protest movement.
A spokesman for the council, a constitutional watchdog formed by a 12-member group of clerics and Islamic law experts, said only that it was "ready to recount the disputed ballot boxes claimed by some candidates, in the presence of their representatives".
"It is possible that there may be some changes in the tally after the recount," Abbasali Kadkhodai, a council spokesman, said.
"Based on the law, the demand of those candidates for the cancellation of the vote, this cannot be considered," he told state television.
|Anti-Ahmadinejad protesters say that their vote has been stolen [GALLO/GETTY]
In Washington, Barack Obama, the US president, said the protests indicated "Iranian people are not convinced with the legitimacy of the election", and he said "people's voices should be heard and not suppressed".
But he also said that he did not want to be seen as "meddling" in Iranian internal affairs, given the history between the two countries.
He said that the two main candidates were not all that different anyway in terms of hostility towards Washington.
Iran has grown increasingly sensitive to how the world views the heightened tensions and has subsequently restricted reporting by journalists working for foreign media.
Iranian state television said earlier that the "main agents" in post-election unrest had been arrested while carrying explosives and guns.
Gholamhossein Mohseni-Ejei, Iran's intelligence minister, said his ministry was chasing two categories of people seeking to create instability in Iran, one of them backed from abroad.
Despite the upheaval in Iran, Ahmadinejad travelled to Russia for a meeting of the Shanghai Co-operation Organisation (SCO), his first foreign trip since official results gave him a second four-year term.