Iran's top leader has ruled out cooperation with America against the Islamic State group, their common enemy in Syria and Iraq.

Supreme Leader Ayatollah Ali Khamenei says that despite the landmark nuclear deal with world powers, Iran has "many small and big enemies, but foremost among them are America" and Britain.

He spoke at a Tehran ceremony Friday marking the 27th anniversary of the death of Ayatollah Ruhollah Khomeini, the leader of the 1979 Islamic Revolution that brought hard-line clerics to power and ousted the U.S.-backed Shah Mohammad Reza Pahlavi.

Khamenei says any cooperation with the United States would be "against independence" of Iran.

The deal with world powers went into effect this year, easing Tehran's isolation and removing many economic sanctions in exchange for Iran curtailing its nuclear program.