(Adds detail on fatalities and injuries)
DUBAI, Oct 19 (Reuters) - A suicide bomber killed two guards as he blew himself up outside a mosque in a restive southern province of Iran on Friday after being prevented from reaching worshippers inside, Iranian media reported.
The bomber set off his explosive belt a few hundred metres (yards) outside the Imam Hossein mosque in the city of Chabahar, killing two members of the Basij militia that were on guard, Fars news agency reported.
"Eyewitnesses said the attacker was trying to get inside the mosque but he was identified by members of the Basij," Fars reported.
Six others, including three children, sustained injuries in the explosion, it said.
Chabahar is in Sistan-Baluchistan province, near the Pakistani border. It has a history of unrest, with the mainly Sunni Muslim population complaining of discrimination at the hands of Iran's Shi'ite Muslim authorities.
An attack by two suicide bombers at the same mosque in 2010 killed 39 people including women and children during a religious ceremony.
The Sunni rebel group Jundollah, which says it is fighting for better rights for Sunni Muslims in Iran, claimed responsibility for that attack, which it said was in revenge for the execution of its leader, Abdolmalek Rigi.
The group is believed to be based in Pakistan and since 2003 has claimed a number of attacks and kidnappings inside Iranian territory.
In its most audacious attack, it targeted a meeting of Revolutionary Guards and tribal figures from Sistan-Baluchistan in October 2009, killing six senior commanders and 29 others.
Iran says Jundollah has links to al Qaeda and has accused Pakistan, Britain and the United States of supporting it to stir instability in its southeast. The three countries deny backing Jundollah. (Reporting by Marcus George; Editing by Kevin Liffey)