Iran's defeated election candidate, Mir-Hossein Mousavi, has alleged that rigging of the presidential election was planned months in advance.

In a letter to the country's top legislative body, the Guardian Council, Mr Mousavi repeated his call for the election to be annulled and said he was ready for ‘martyrdom’.

He told Iranians to stage a national strike if he is arrested, but told his supporters that he is not confronting the Islamic state.

An Iranian news agency reported that Mr Mousavi said that by not allowing legal rallies, Iran may face ‘dangerous consequences’.

Two people were killed in a suicide bomb at the mausoleum of the father of Iran's revolution, Ayatollah Ruhollah Khomeini.

State television said eight people were injured. It said the attack took place at the northern entrance to the Imam Khomeini shrine.

Witnesses reported that Mousavi supporters set fire to a building in southern Tehran used by backers of President Mahmoud Ahmadinejad.

Elsewhere in Tehran, riot police were deployed in force and fired teargas, batons and water cannons to disperse protesters defying a ban on demonstrations.

Witnesses said 2,000 to 3,000 people had gathered, far fewer than the hundreds of thousands involved in earlier rallies.

A senior Iranian commander said earlier today that police would deal firmly with any illegal gatherings from now on.

Yesterday, supreme leader Ayatollah Ali Khamenei called for an end to the street protests and he warned opposition leaders that they would face the consequences.

US President Barack Obama also urged the Iranian government to ‘stop all violent and unjust actions against its own people’.

‘The Iranian government must understand that the world is watching. We mourn each and every innocent life that is lost,’ Mr Obama said in a statement.

‘The universal rights to assembly and free speech must be respected, and the United States stands with all who seek to exercise those rights,’ he said.

Meanwhile, the Guardians Council electoral watchdog offered to randomly recount up to 10% of the ballot boxes from the disputed 12 June presidential election, state television said.

The Council made its partial recount offer after meeting to study the 646 alleged poll violations registered by the three defeated candidates - former parliament speaker Mr Karroubi, former premier Mr Mousavi and ex-Revolutionary Guards chief Mohsen Rezai.

Neither Mr Mousavi nor Mr Karroubi showed up at the meeting, Press TV reported, without saying why.

There have been daily demonstrations in Tehran since the disputed re-election of Mahmoud Ahmadinejad last week drew claims from his rival Mr Mousavi of massive vote fraud.

Yesterday, siding with Mr Ahmadinejad, Ayatollah Khamenei ruled out major fraud in the poll.

‘The people have chosen whom they wanted,’ Ayatollah Khamenei said in a sermon at weekly prayers referring to Mr Ahmadinejad.

‘I see some people more suitable for serving the country than others but the people made their choice,’ he said to cheers from tens of thousands of faithful, who included Mr Ahmadinejad.

After the sermon US President Barack Obama warned Iran that the ‘world is watching’ its actions.

‘I'm very concerned based on some of the tenor - and tone of the statements that have been made - that the government of Iran recognise that the world is watching,' Mr Obama said on US television.