By Babak Dehghanpisheh

BEIRUT (Reuters) - President Hassan Rouhani on Wednesday urged Iran's powerful Revolutionary Guards and the Basij militia under its control not to meddle in Friday's presidential election, in a rare warning that underscored rising political tensions.

The Guards, who oversee an economic empire worth billions of dollars, are seldom criticized in public, but the pragmatist Rouhani is locked in an unexpectedly tight race against hardline cleric Ebrahim Raisi, who is believed to have their support.

"We just have one request: for the Basij and the Revolutionary Guards to stay in their own place for their own work," Rouhani said in a campaign speech in the city of Mashad, according to the Iranian Labour News Agency (ILNA).

Rouhani reinforced his appeal by quoting the late Ayatollah Ruhollah Khomeini, founder of the Islamic Republic, who he said had warned the armed forces against interfering in politics.

Suspicions that the Guards and Basij falsified election results in favor of Mahmoud Ahmadinejad led to nationwide protests in 2009. Dozens of people were killed and hundreds were arrested, according to human rights groups, in the largest unrest in the history of the Islamic Republic.

Supreme Leader Ayatollah Ali Khamenei, the highest authority in Iran, said on Wednesday that maintaining security was a top concern for the election. He also denounced the heated rhetoric of the campaign as "unworthy", in a thinly-veiled rebuke of Rouhani, who is seeking a second four-year term.

ACCUSATIONS

Rouhani, 68, and Raisi, a 56-year-old protégé of the supreme leader, have traded charges of graft and brutality on live television with an open vehemence unseen in the near-40-year history of the Islamic Republic.

Raisi has accused Rouhani of being corrupt and of mismanaging the economy. Rouhani, who wants to open up Iran to the West and ease social restrictions within the country, has responded by accusing Raisi, who served on the judiciary for several years, of human rights violations.

Story continues

Both men deny the other's accusations.

Raisi developed a close relationship with senior members of the Revolutionary Guards while at the judiciary and has their backing, according to Mohsen Sazegara, a founding member of the Revolutionary Guards who is now a U.S.-based dissident.

"Raisi is the Revolutionary Guards' candidate," he said.

The Guards are looking beyond Friday's election and see Raisi as a possible candidate to be the next supreme leader, analysts say.

Although Khamenei, 77, is guarded about his political preferences, he also appears to back Raisi both as a presidential candidate and possible successor.

(Reporting By Babak Dehghanpisheh; Editing by Gareth Jones)