President Muhammad Khatami said on Thursday that "those who have committed crimes in Iran will be judged in Iran and the others will be extradited to their country of origin".
He said: "There is no place for al-Qaida, no place for any terrorist, for those who act against peace in the world."
Khatami, who was speaking from Geneva, added al-Qaida was "very hostile" to the Iranian government.
The United States has asked Tehran several times to extradite members of the group on its territory, most recently on Monday.
"We believe Iran should turn over all suspected al-Qaida operatives to the United States or to countries of origin or third countries for further interrogation and trial," State Department spokesman Richard Boucher said in Washington.
However, the US stressed it was not considering a swap of Iranian opposition People's Mujahadin members held by US forces in Iraq in return for al-Qaida operatives held in Iran.
Khatami said Iran was ready to welcome opposition fighters who "are in Iraq and regret" past acts.
Bin Ladin's group is hostile to the
"We will welcome them and judge them according to the law," he said.
Reports over the weekend said Jordan's King Abd Allah II was quietly trying to broker a deal between the United States and Iran on the prisoners.
Meanwhile, Iran's president had earlier insisted his country will not make nuclear weapons, and told Muslims they should embrace democracy.
Launching an urgent appeal for dialogue between Islam and Christianity, Muhammad Khatami told the World Council of Churches (WCC) that Islam ruled out the use of nuclear weapons.
"The Islam that I know does not allow the use of nuclear weapons, then we cannot go ahead and manufacture them," he said.
Khatami's comments came a day after Iran said it had given the International Atomic Energy Agency (IAEA) the go-ahead to carry out more intrusive inspections of its nuclear programme.
During his address to a seminar on religious tolerance organised by the WCC, Khatami also gave an unusually frank endorsement of democracy.
"The Islam that I know does not allow the use of nuclear weapons, then we cannot go ahead and manufacture them"
"I think democracy is the only alternative, we can take it as Muslims," he said.
"We must accept this has been materialised in the West, we must accept this as Muslims," Khatami, an Islamic scholar added, warning the alternative was authoritarian and despotic rule.
Iran had problems, the president admitted, "we have violations of human rights, we know these are going on", although he said the country had the most democratic system in the region.
Khatami's speech focused on a plea for religious tolerance, warning that the shared values of faith and religion had been eroded worldwide by bigotry as well as by anti-religious sentiment.
"The dialogue between civilisations, but also the dialogue between religions, in particular between Islam and Christianity are a vital, imperative and unavoidable necessity.
"I have to add in this respect that unfortunately those with power in this world, instead of reducing and removing the misunderstandings, are contributing to their revival," he added.
Iran's president also pointed out that the 20th century had been marked by unprecedented wars and violence, including the "ugly face of terrorism".
"I think democracy is the only alternative... We must accept this has been materialised in the West, we must accept this as Muslims"
He said: "It showed its ugliest face in the cities of New York and Washington in September 2001."
The Iranian leader, seen as a reformist figure in the Islamic state, was in Geneva primarily to attend a UN conference on the impact and development of information technology.
The digital boom has increased the ability to communicate, but has not been able to overcome a gulf in understanding, he cautioned.
"We must note that in our global village, we are unable to understand each other."