TEHRAN - A suicide bomber blew himself up at the mausoleum of the father of Iran's revolution, Ayatollah Ruhollah Khomeini, state media said Saturday, in an attack coinciding with more unrest over a disputed presidential vote.

EDITORS' NOTE: Reuters and other foreign media are subject to Iranian restrictions on their ability to report, film or take pictures in Tehran.

A few minutes ago a suicide bomber exploded himself in the shrine, police official Hossein Sajedinia was quoted by the semi-official Mehr news agency as saying.

Press TV said the attacker died and eight people were injured. It said the attack took place at the northern entrance to the Imam Khomeini shrine.

Supporters of defeated presidential candidate Mirhossein Mousavi set on fire a building in southern Tehran used by backers of President Mahmoud Ahmadinejad, a witness said.

The witness also said police shot into the air to disperse rival supporters in Tehran's south Karegar street.

Elsewhere in Tehran, riot police deployed in force, firing teargas, batons and water cannons to disperse protesters defying a ban on demonstrations, state media said.

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

The reported attack on Khomeini's mausoleum seemed likely to stir outrage among Iranians who deeply revere the Shi'ite cleric who led the 1979 revolution that toppled the U.S.-backed shah.

The past week of protests have been the most widespread expression of anti-government feeling since the revolution.

Iran's highest legislative body said it was ready to recount a random 10 percent of the votes cast in the June 12 poll to meet the complaints of Mousavi and two other candidates who lost to Ahmadinejad.

Mousavi, whose supporters have staged vast unauthorized rallies in the past week, has demanded the election be annulled.

Security forces had turned out in strength to prevent any further rallies in the Iranian capital, a day after Supreme Leader Ayatollah Ali Khamenei told protest leaders they would be responsible for any bloodshed if unrest continued.

WAFTS OF TEARGAS

Teargas billowed up from Enghelab (Revolution) Square as riot police confronted demonstrators, a witness said.

A witness said protesters had decided to spread out into smaller groups in the Iranian capital because of the massive police presence in the square.

A police commander said earlier that his forces would deal firmly with any more street protests over the June 12 vote.

The Etemad-e Melli party of losing candidate Mehdi Karoubi said plans for a rally had been scrapped for lack of a permit and an ally of Mousavi said the moderate politician had not summoned his followers back to the streets.

The 12-man Guardian Council, which must certify the result of the election, announced plans for a partial recount.

Although the Guardian Council is not legally obliged ... we are ready to recount 10 percent of the (ballot) boxes randomly in the presence of representatives of the three (defeated) candidates, a council spokesman said.

The council had invited Mousavi, Karoubi and a third candidate, Mohsen Rezaie, to raise their complaints at a special session. But only Rezaie, a conservative who is a former Revolutionary Guard commander, attended.

Witnesses said they had seen Basij Islamic militia deploying across Tehran and one resident saw at least three buses full of Basij heading for the capital from the nearby city of Karaj on Saturday, as well as four trucks full of the motorcycles used by Basij militiamen during previous demonstrations.

If there is any bloodshed, leaders of the protests will be held directly responsible, the white-bearded Khamenei told huge crowds thronging Tehran University for Friday prayers.

State media have reported seven or eight people killed in unrest since the election outcome was published on June 13.

Scores of reformists have been arrested and authorities have cracked down on foreign and domestic media.

U.S. President Barack Obama condemned the violence carried out by security forces and believed Iranians should be free to protest, his spokesman said Friday after Khamenei's speech, sharpening the White House's rhetoric over the post-election events.

In a sign of defiance, Mousavi backers took to Tehran rooftops after nightfall Friday to shout Allahu Akbar (God is greatest), a deliberate echo of tactics in the 1979 revolution.

Khamenei called for calm in his country, a major oil exporter embroiled in dispute with major powers over its nuclear program, which the West suspects could be used to make bombs. Tehran says its nuclear work is peaceful.

He also attacked what he called interference by foreign powers who had questioned the result of the election.

The election result showed Mousavi won 34 percent of the votes to Ahmadinejad's tally of nearly 63 percent.

Iran's national security council dismissed a complaint Mousavi had written earlier this week about plainclothesmen using sticks and metal rods to attack protesters.

Your national duty and responsibility would require that instead of raising charges against police or army forces ... to try to avoid such illegal gatherings and not support them, Fars News Agency quoted its secretary Abbas Mohtaj as saying.

(Editing by Alistair Lyon)