TEHRAN (AFP) - Irans Supreme leader Ayatollah Ali Khamenei vowed on Sunday that Iran will prosecute anyone who has committed crimes against people harmed in post-election unrest, state television reported. Speaking in the wake of allegations that detainees have been raped and tortured, Khamenei was quoted as telling a group of academics in Tehran: All those who have been hurt in these (post-vote) incidents should know that the system does not intend to compromise. If a bad deed or crime has been committed those behind it will be dealt with rightfully and legally, the supreme leader said, just as those who openly stand against the system are confronted. Khamenei appears to have softened his tone on the Opposition in recent days and said on Wednesday he was not convinced those who led the protests were backed by foreigners. He also indicated on Wednesday that members of the security forces who took part in the post-election crackdown were not immune from prosecution. I appreciate the work of the police and basij (Islamic militia) in dealing with the riots, but this does not mean that some of the crimes which occurred will not be dealt with and anyone who is a member of those two who committed a fault should be dealt with, Khamenei said.