TEHRAN, Iran -- Iran's top leader Ayatollah Ali Khamenei said Sunday he is against US intervention in neighboring Iraq, where Islamic extremists and Sunni militants opposed to Tehran have seized a number of towns and cities, the official IRNA news agency reported.

"We strongly oppose the intervention of the U.S. and others in the domestic affairs of Iraq," Khamenei was quoted as saying, in his first reaction to the crisis.

"The main dispute in Iraq is between those who want Iraq to join the U.S. camp and those who seek an independent Iraq," said Khamenei, who has the final say over government policies. "The U.S. aims to bring its own blind followers to power since the U.S. is not happy about the current government in Iraq. "

Khamenei said Iraq's government and its people, with help of top clerics, would be able to end the "sedition" there, saying extremists are hostile to both Shiites and Sunnis who seek an independent Iraq.

Earlier on Sunday Iran's President Hassan Rouhani said some countries "feed terrorists by their petrodollars," in a veiled reference to the Arab Gulf states, and warned that such support would come back to haunt them.

"Rest assured, tomorrow will be your turn. The barbarous terrorists will go after supporters of terrorism in the future," said Rouhani.

Shiite Iran supports the Shiite-led government in Baghdad, and has said it would consider any request for military aid.

The commander of Iran's elite Quds Force, Gen. Ghasem Soleimani, was reportedly in Iraq last week to consult with the government there on how to stave off insurgents' gains. Soleimani's forces are a secretive branch of Iran's Revolutionary Guard that in the past has allegedly organized Shiite militias to target U.S. troops in Iraq and, more recently, was involved in helping Syria's President Bashar Assad in his fight against Sunni rebels.

The Iraqi dictator Saddam Hussein fought an eight-year war with Iran in the 1980s that left more than a million dead on both sides. Many current Iraqi leaders spent years in exile in Iran.