Hundreds of thousands of pro-government Iranians have been rallying to mark the 31st anniversary of Iran's revolution.
President Mahmoud Ahmadinejad used the rally to attack the West, and said Iran had produced its first stock of 20% enriched uranium.
The opposition has been trying to stage counter-demonstrations, but faced a big security crackdown, and several of its leaders have reportedly been attacked.
The anniversary is the most important day in Iran's political calendar.
The government has warned protesters will be dealt with.
Official events were held across Iran, but the main gathering was at Tehran's Azadi Square. State TV showed tens of thousands of people filling the streets.
Mr Ahmadinejad told the crowds Iran was now a "nuclear state" and would soon treble output of 20% enriched uranium.
Jon Leyne, BBC Tehran correspondent, reporting from London
In the media battle, so far today has certainly been a victory for the Iranian government.
It's not clear, though, whether today's events will do anything to break the deadlock between government and opposition.
The opposition reports a security presence in Tehran perhaps unprecedented in recent years, with roads blocked, and layers of police and members of the Basij militia, all designed to prevent them gathering or getting near the official demonstration.
Those who have made it to central Tehran have been confronted with riot police, tear gas, possibly even gunfire.
It indicates that the authorities are still deeply nervous about their support, and the government could still be vulnerable if there are new problems with the economy, or if they attempt to round up the leaders of the opposition. The battle for the future of Iran continues.
He added that Western countries were hampering genuine reform in Iran.
BBC Tehran correspondent Jon Leyne says the anniversary could be the largest confrontation since the disputed election last June, and the government and opposition have chosen to make the day a huge trial of strength.
Our correspondent says the government is very nervous about the opposition demonstrations, but its own supporters have drawn a good crowd.
Meanwhile, reports from the micro-blogging site Twitter and pro-opposition websites said opposition Green Movement supporters were holding rallies, one of them in the city's Saddeqiya Street.
The opposition is trying to bring more people into central Tehran but is being confronted by a large number of the government's Basij militia, the reports say.
Security forces are armed with tear gas, live rounds - which they are firing into the air - and paint balls to mark protesters.
Witnesses say they have been loading opposition supporters onto buses.
The Green Movement promised more gatherings later in the day, but with internet access severely restricted it is unclear how many supporters it will be able to muster.
Amateur footage purportedly showing opposition protests has been appearing on the video-sharing website YouTube, including at least one rally in the Tehran underground.
We are closely watching the sedition movement, and several people preparing to disrupt the rallies were arrested
Opposition leader Mehdi Karroubi had been intending to attend the Saddeqiya street rally, reports say, but he was beaten up by members of the Basij as he emerged from his car. His son was arrested as he tried to intervene.
The reformist former President Mohammad Khatami was also reportedly attacked.
His brother, Mohammed Reza Khatami, and his wife, Zahra Eshraghi, the granddaughter of the late Supreme Leader Ayatollah Ruhollah Khomeini, were arrested but later released.
Other opposition sources said security forces had fired shots and tear gas at supporters of Mir Hossein Moussavi, Mr Ahmadinejad's main rival in last June's elections.
A policeman can be seen beating a man thought to be an anti-government protester - This video, posted on YouTube, cannot be verified by the BBC
Later unconfirmed reports said Mr Moussavi was prevented from joining a rally, and his wife Zahra Rahnavard - also a key opposition figure - was "beaten".
Opposition protests have also been reported in the cities of Tabriz, Shiraz and Isfahan.
Anti-government websites urged marchers to display green emblems or clothes - the colour adopted by the opposition movement after the disputed election on 12 June last year.
'Ready for trouble'
Deadly clashes erupted after the poll, and have taken place sporadically since then.
Ahead of the commemorations, police chief Esmail Ahmadi Moghaddam said the Revolutionary Guards and Basij Islamic militia were ready for any trouble.
"We are fully prepared for holding a safe and glorious rally," he told the semi-official Fars news agency, according to Reuters news agency.
"We are closely watching the activities of the sedition movement, and several people who were preparing to disrupt the 11 February rallies were arrested," he said.
Our correspondent says the situation is now a stalemate, with the opposition showing it is still around and cannot be kept off the streets.
The government is not used to such protests and is infuriated by this, he adds, although opposition support appears not to be enough to overthrow the government.
There are reports of internet restrictions, with web giant Google saying its e-mail traffic in Iran had dropped sharply.
Google said users of its Gmail service had experienced difficulties following a newspaper report about official restrictions.
US state department spokesman Philip Crowley said it appeared Iran had "attempted a near total information blockade" to deal with anti-government protesters.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.