Iranian President Hassan Rouhani, in an exclusive interview with NBC News' Ann Curry, denounced ISIS for its savagery but also branded the U.S.-led coalition against the terror group as "ridiculous."
Speaking from the presidential palace in Tehran ahead of his visit to the United Nations, Rouhani questioned President Obama's decision to go after ISIS with air strikes.
"Are Americans afraid of giving casualties on the ground in Iraq? Are they afraid of their soldiers being killed in the fight they claim is against terrorism?" Rouhani said.
"If they want to use planes and if they want to use unmanned planes so that nobody is injured from the Americans, is it really possible to fight terrorism without any hardship, without any sacrifice? Is it possible to reach a big goal without that? In all regional and international issues, the victorious one is the one who is ready to do sacrifice.
"Maybe it is necessary for air strikes in some conditions and some circumstances," he added. "However, air strikes should take place with the permission of the people of that country and the government of that country."
Asked about the extremists' beheading of American James Foley and Steven Sotloff and Briton David Haines, Rouhani said ISIS' actions are at odds with Islamic tenets.
"They want to kill humanity," he said. "And from the viewpoint of the Islamic tenets and culture, killing an innocent people equals the killing of the whole humanity. And therefore, the killing and beheading of innocent people in fact is a matter of shame for them and it's the matter of concern and sorrow for all the human and all the mankind."
But he also took issue with the American-led coalition, saying members include nations that helped ISIS with weapons and training. He declined to name the countries.
He said Iran will give Iraq any support it requests for combating ISIS, but made a point of saying religious sites must be protected.
"When we say the red line we mean the red line," Rouhani said. "It means we will not allow Baghdad to be occupied by the terrorists or the religious sites such as Karbala or Najaf be occupied by the terrorists."
Rouhani sat down with Curry a year after she became the first American journalist to interview him following his election — ahead of a thawing in U.S.-Iranian relations that paved the way for talks with the West about Tehran's disputed nuclear program.
In Wednesday's interview, Rouhani said he believes the nuclear talks can still lead to a resolution. "Maybe the time could be arguable, either today or tomorrow. However, we have no doubt that the only solution to the nuclear issue goes through negotiation," he said.
He also expressed optimism about Iran's warming relations with the United States. "The close relationship between the two nations can resolve many problems. A closer contact and relationship would also be beneficial for the American state person, and they can open new ways for the American politicians. We have to look at future more than the past," he said.