Iran President Hassan Rouhani on Thursday blamed the rise of the Islamic State group and other militants on the mistakes of the West and said the solution to stopping them must come from the Middle East.

"The strategic blunders of the West in the Middle East, Central Asia and the Caucasus have turned these parts of the world into a haven for terrorists and extremists," he said in a speech to the 193-member United Nations General Assembly.

In a thinly veiled reference to the United States and Israel, Rouhani blamed the rise of violent extremists on outsiders. "Certain intelligence agencies have put blades in the hand of madmen, who now spare no one," he said.