Egyptian President Abdel-Fattah el-Sissi is feeling vindicated by the world's alarm over Islamic extremism that is fueling wars and bloodshed across the Middle East.

The former army general has faced widespread international criticism for his ouster last year of Egypt's first freely elected president and his ferocious crackdown on Islamists that has killed more than 1,000 and imprisoned more than 20,000. A year later, after el-Sissi's election as president, his critics fear he is leading his country into autocracy, with pro-democracy dissenters jailed or silenced.

But in an interview with The Associated Press — his first with the foreign media since he took office in June — el-Sissi insists all his actions were to combat militancy and save the country from civil war. He said Egypt is a model for fighting terrorism and that the U.S.-led coalition to fight the Islamic State group in Iraq and Syria should take note.

"More than a year ago, I warned that the region was heading to great danger from extremist thought," he said. "It didn't receive proper attention until the events in Iraq took place and the Islamic State swept over the Iraqi-Syrian borders."

His approach, however, has raised concerns over the potential for democracy in Egypt.

El-Sissi and his supporters effectively group the Muslim Brotherhood — an organization that won repeated elections over the past three years — as equivalent to hardline militant groups wreaking havoc from Libya to Iraq. They accuse the Brotherhood of being behind violence in Egypt. The Brotherhood denies that, saying it is merely an excuse for el-Sissi to wipe out a political rival. Secular activists say the government uses the fight against terrorism as a reason to silence any criticism.

Washington is looking for support by Arab nations for its strategy to strike the Islamic State group. But at the same time, it has been critical of Egypt's crackdown on Islamists, withdrawing some military aid and straining a longtime alliance. El-Sissi makes his first visit to the United States as president to attend the U.N. General Assembly in the coming week. So far there are no plans for talks with President Barack Obama.

El-Sissi said he is ready to help the U.S.-led coalition. Asked if Egypt might provide airspace access or logistical support for airstrikes, he said, "We are completely committed to giving support. We will do whatever is required."

But he appeared to rule out sending troops, saying Iraq's military is strong enough to fight the militants and that "it's not a matter of ground troops from abroad."

Most importantly, he said, extremism across the region must be tackled — not just the Islamic State. He warned that the greatest danger came from foreign fighters flooding into the region's conflicts, saying they will eventually return to their home countries — including in Europe — and spread extremism there. He said they "must be prevented" from entering the region.

He said Egypt and Algeria were cooperating "to restore stability in Libya," but would not comment on reports Egypt had cooperated in airstrikes on militants in the North African nation. He confirmed for the first time that two deadly attacks on Egyptian troops in its western desert were carried out by militants who crossed into Egypt from Libya.

He said any strategy must also deal with the causes of militancy by fighting poverty, improving education and moderating religious discourse. "When all that happens together, it will bring a decisive result."

His comments seemed a contradiction: So far, Egypt's main approach has been the heavy-handed crushing of Islamists, along with other critics, bringing it international condemnation.

But the comments also pointed to a characteristic the career military intelligence officer has shown ever since he rose to prominence by ousting Islamist President Mohammed Morsi in July 2013: A self-confidence that he can dramatically change Egypt and that others will fall in line. His government is planning economic reforms that would reduce massive subsidies for fuel and foodstuffs and, he says, funnel the money instead into education and health.

El-Sissi said Egyptians set an example for the region, saying they had supported the Brotherhood and elected them but then turned against them after Morsi's year in office. He said Egyptians realized that the idea of political Islam advocated by the Brotherhood "won't work in Egypt." Millions joined protests against Morsi, leading to his ouster.

If he had not stepped in to remove Morsi and the Brotherhood, Egypt "would be like all the countries that now suffer from widespread violence, internal conflicts and civil wars," he said, referring to Syria, Libya and Iraq.

In the face of criticism over a range of human rights concerns, el-Sissi argued that the need to establish security in Egypt — where Islamic militants have waged a campaign of violence — and repair the economy took priority. Rights groups have condemned a draconian law last year that effectively bans protests by requiring a police permit. Several democracy advocates have been handed long prison sentences under the law.

"I would never say that what is happening in Egypt is ideal," he said. "Of course, I want there to be a very large degree of freedom. But we want to do that without hurting our nation. Our nation is in very difficult circumstances. You see what's going on in the region," he said.

He argued the number of arrests was not high, saying "security agencies have shown great patience." The protest law, he said, was the same as ones in Europe that require police permits. Egyptian police, however, rarely give permission for gatherings.

Justifying the past year's crackdown, he said the Brotherhood had "chosen confrontation." But he said followers of the group could participate in politics in the future if they renounce violence. Parliamentary elections are to be held by the end of the year, he said. The Brotherhood and its political party, however, have been banned.

"To anyone who doesn't use violence, Egypt is very forgiving," he said. "The chance for participation is there."

He also said he cannot interfere with the judiciary in the case of three journalists from Al-Jazeera English television who have been sentenced to seven years in prison over terrorism-related charges. Their trial was dismissed by human rights groups as a farce, and their convictions brought heavy international criticism.

"If I had been in charge at the time, I never would have let the issue go so far. I would have deported them," he said — though two of the three are Egyptian. But he said that if Egypt is to have an independent judiciary, "We can't accept criticism or comment" on court rulings.

He did not address whether he would pardon the three after the appeals process is finished.

The three journalists — Australian Peter Greste, Canadian-Egyptian Mohamed Fahmy and Egyptian Baher Mohammed — were convicted of promoting or belonging to the Brotherhood and of falsifying their coverage of protests by Morsi's supporters in order to hurt Egypt's security.

But the three said they were arrested for simply doing their job. During the trial, prosecutors presented no evidence any footage was falsified, simply presenting news reports of protests as evidence.