The rise of violent extremism around the world is the fault of “certain states” and “intelligence agencies” that have helped to create it and are failing to withstand it, Iranian President Hassan Rouhani said in an address to the UN General Assembly.

Speaking at the 69th session of the UN General Assembly on Thursday, Rouhani stressed that extremism is not a regional but a global issue, and called on states worldwide to unite against the extremists.

“Certain states have helped to create it, and are now failing to withstand it. Currently our peoples are paying the price," he said. "Certain intelligence agencies have put blades in the hand of the madmen, who now spare no one.”

Rouhani also said the current anti-Western sentiment in certain parts of the world was "the offspring ofyesterday's colonialism. Today's anti-Westernism is a reaction to yesterday's racism.”

The Iranian president urged “all those who have played a role in founding and supporting these terror groups” to acknowledge their mistake.

Rouhani also blamed “strategic blunders of the West in the Middle East, Central Asia and the Caucasus” for inciting violence in these regions and creating a “haven for terrorists and extremists.”

"Military aggression against Afghanistan and Iraq and improper interference in the developments in Syria are clear examples of this erroneous strategic approach in the Middle East."

Warning that “if the right approach is not undertaken in dealing with the issue at hand” the Middle East risks turning into “a turbulent and tumultuous region with repercussions for the whole world.”

"The rightsolution to this quandary comes from within the region and regionally provided solution withinternational support and not from the outside the region," he said.

Speaking of Iran’s nuclear program, Rouhani vowed that Tehran would continue negotiations to cement the deal with Western states.

“No one should doubt that compromise and agreement on this issue is in the best interest of everyone, especially that of the nations of the region,” he said. “According to all international observers, the Islamic Republic of Iran has carried out its commitments in good faith.”

Rouhani, who was elected in Iran’s presidential election last year despite being opposed by many in the country’s senior clergy, said that democracy cannot be exported to another country as it is a product of development, “not war and aggression.”

“Democracy is not an export product that can be commercially imported from the West to the East. In an underdeveloped society, imported democracy leads only to a weak and vulnerable government,” he told the assembly.