UN Secretary General Ban Ki-moon urged Iran on Thursday to release opposition leaders, political activists and journalists, as a step toward improving its poor human rights record.

"It is especially important for the voices of Iran's people to be heard during next year's presidential election," Ban said late Thursday in a speech at the School of International Relations in Tehran.

"That is why I have urged the authorities during my visit this time to release opposition leaders, human rights defenders, journalists and social activists to create the conditions for free expression and open debate."

Ban, who arrived in Iran on Wednesday to attend the Non-Aligned Movement (NAM) summit, held talks with Supreme Leader Ayatollah Ali Khamenei and President Mahmoud Ahmadinejad.

Before leaving, Ban told reporters in Tehran on Friday: "I also called on Iran to cooperate with the UN human rights envoy."

The Iranian government has refused to host UN human rights rapporteur on Iran Ahmed Shaheed, who has criticized the Islamic republic's human rights violations.

Human Rights Watch says Iran has been targeting journalists, lawyers, rights activists and students following the 2009 presidential election, which sparked mass demonstrations by supporters of reformists Mir-Hossein Moussavi and Mehdi Karroubi.

Reformists said the election, which was won by Ahmadinejad, was fraudulent and called for its cancellation.

There has also been speculation that Ban would request to visit Moussavi and Karroubi, who have been under house arrest since February 2011.

At the opening ceremony of the NAM summit on Thursday, Ban criticized Iran's lack of cooperation on its disputed nuclear program with the UN nuclear watchdog as well as its anti-Israel rhetoric.

Before leaving Tehran on Friday, Ban told reporters that he had discussed his concerns over the human rights situation to the Iranian government, especially with regards to the next year's presidential election, ISNA news agency reported.