By Ramin Mostafavi and Robin Pomeroy
TEHRAN (Reuters) - Iran's supreme leader said on Wednesday a parliamentary election scheduled for early next year posed a potential risk to the country's security and he called for national unity.
After the contested re-election of President Mahmoud Ahmadinejad in 2009 when huge protests were crushed by security forces, Iran's ruling elite is keen for the voting next March to pass off without similar unrest or, as seems more likely, a low turnout from disaffected voters.
"We have an upcoming election at the end of the (Iranian) year. To some extent elections have always been a challenging issue for our country," Ayatollah Ali Khamenei told worshippers at prayers marking the end of the Muslim holy month of Ramadan.
"Although, compared to elections in other countries and those so-called advanced countries where so much betrayal, malevolent acts, conflicts and even murder happen, thank God in our country it is not like that, but still it is a challenge," he said in the televised address.
"We should be careful that this challenge does not hurt the country's security," the 72-year-old cleric added.
Khamenei fully endorsed Ahmadinejad's re-election, which opposition supporters said was rigged. The government denied that, calling the post-election protests riots stirred up by Iran's foreign enemies aiming to overturn the Islamic system.
Rights groups estimate around 100 people were killed in the unrest, a figure the government denies.
The losing reformist candidates in that election, Mehdi Karoubi and Mirhossein Mousavi, have been under house arrest since February when they called for the first "Green Movement" opposition demonstrations for more than a year.
Their continued incarceration means many reformist candidates may choose to boycott the coming elections, a potential embarrassment for the Islamic Republic's unique blend of democracy and clerical rule.
Khamenei last Saturday ordered a pardon for 100 people accused or convicted of "security-related" offences, including some involved in the post-election upheaval -- the first sign of conciliation toward the opposition.
In his speech, the leader invoked events -- popular revolts -- in the Arab world which he has dubbed an "Islamic awakening" and said Iranians should put unity ahead of any grievances.
"The world is going through an important chapter in its history. We should be very cautious in this period and keep vigilant. If annoyances, ill wishes, discord and wickedness exist among ourselves ... we cannot carry out our important tasks. It is a fundamental necessity for our country."
Any unrest around the elections would be new evidence of interference by Iran's enemies, he said.
"You felt it at a close distance when our enemies want(ed) to use elections against our country's security, you saw that. Everyone should be vigilant. The various authorities should guard the elections like a divine gift."
(Editing by Mark Heinrich)