TEHRAN - Iranian police arrested mourners who gathered at a Tehran cemetery to commemorate victims of the unrest that followed the country's disputed June presidential election, witnesses said on Thursday.

The police forced Mirhossein Mousavi, a defeated candidate at the election, to leave the cemetery.

Hundreds have gathered around Neda Agha-Soltan's grave to mourn her death and other victims' deaths ... police arrested some of them ... dozens of riot police also arrived and are trying to disperse the crowd, a witness told Reuters.

The witness saw police detaining three mourners. Officials were not available to comment on the number of detainees.

Later the witness said: Police forced Mousavi to return to his car and leave the cemetery. Police also are warning mourners to leave the place or face the consequences.

Mourners are leaving in small groups, said the witness.

Defeated candidates Mousavi and Mehdi Karoubi had said they would attend the ceremony, said Ghalamnews, Mousavi's website, defying a threat by Revolutionary Guards to break up the gathering.

When Mousavi arrived at the Behesht-e Zahra cemetery, mourners clung to his car, chanting 'Mousavi we support you', the witness said.

The presidential vote plunged Iran into its biggest internal crisis since the 1979 Islamic revolution and exposed deepening divisions in its ruling elite. Mousavi and Karoubi say the June 12 vote was rigged in favor of re-elected President Mahmoud Ahmadinejad.

Mousavi and Karoubi had accepted the invitation of Neda's mother to mark the 40th day since her death and remember other victims of the unrest at Neda's grave.

Neda, a 26-year-old music student, was shot on June 20, when supporters of Mousavi clashed with riot police and Basij militiamen in Tehran. Footage of her death has been watched by thousands on the Internet.

Authorities have said Neda was not shot by a bullet used by Iranian security forces, suggesting the incident was staged to blacken the image of the clerical establishment.

Iranian media have reported the deaths of several other protesters following the vote. Rights groups say hundreds of people, including senior pro-reform politicians, journalists, activists and lawyers, have been detained since the election.

The head of Tehran's Revolutionary Guards, Brigadier General Abdollah Araghi, had warned against any gathering.

We are not joking. We will confront those who want to fight against the clerical establishment, said Araghi, according to the semi-official Fars news agency on Wednesday.

Iranian authorities had turned down a request by opposition leaders to hold a memorial ceremony for the unrest victims on Thursday at Tehran's Grand Mosala, a prayer location where tens of thousands can gather.

Some websites said Mousavi would go to Mosala. It could not be confirmed whether Mousavi was heading to Mosala.

Some hardline clerics support Ahmadinejad but other senior Shi'ite figures, including Grand Ayatollah Hossein Ali Montazeri, have attacked the way the authorities have handled the election and its aftermath.

Ahmadinejad is under pressure from his hardline supporters over his initial choice of vice-president and his decision to dismiss a hardline intelligence minister who criticized the president for defying Supreme Leader Ayatollah Ali Khamenei.

Khamenei endorsed the election result and sided openly with Ahmadinejad, but ordered Ahmadinejad to drop his nomination of Esfandiar Rahim-Mashaie as his deputy. Mashaie had said Iran had no quarrel with Israelis, only their government.

For a week Ahmadinejad ignored Khamenei's order. The disarray in the hardline camp is likely to complicate Ahmadinejad's job of forming a new cabinet.

The hardline Ya Lesarat weekly made an unusually blunt comment on the affair, directed at Ahmadinejad.

Your adopted measures in recent weeks have surprised your supporters, it said. If such moves continue, we will strongly urge you to give back our votes.

(Editing by Robert Woodward)