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 airstrikes.

"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 airstrikes 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."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

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.

IN-DEPTH

SOCIAL

Just wrapped exclusive interview with Iran’s President Hassan Rouhani. Racing now to file. #IranOnISIS pic.twitter.com/ydueEwAUmw — Ann Curry (@AnnCurry) September 17, 2014

— Tracy Connor