Afghan President Ashraf Ghani gave a glowing progress report to Congress Wednesday while warning of the growing ISIS threat that was spreading an "ecology of terror" in the region.

Addressing a joint session of Congress, Ghani spoke of a "darker cloud making its way toward our country." He said that "Daesh," the Arabic term for ISIS, "is already sending advance guards to southern and western Afghanistan to test for vulnerabilities."

Ghani said that the Islamic State of Iraq and Syria (ISIS), the Taliban, and the remnants of Al Qaeda posed "a clear and present danger to our neighbors, to the Arab-Islamic world, and to the world at large. Afghanistan is carrying forward everyone's fight by containing this threat."

"That hatred must be challenged and overcome from within the religion of Islam," Ghani said. Moderate Muslims "must find their voice. Silence is not acceptable," he said.

Army Gen. John Campbell, the U.S. commander in Afghanistan, has also warned of a potential ISIS threat to Afghanistan while stating that the evidence of a presence thus far has been limited to "branding efforts" by individuals disaffected with the Taliban leadership.

The warning about ISIS contrasted with the gist of Ghani's speech, which focused on progress in rooting out corruption, building up the Afghan National Security Forces (ANSF), and gains in education and participation in government for women.

Enhancing the roles of women "is a matter of national necessity." As he has said previously on his U.S. visit, Ghani noted that before the U.S. military presence "it was illegal to educate girls."

Now, there are 3 million girls in school, Ghani said to a standing ovation from members of Congress in the House chamber.

Ghani made no mention of the woman named Farkhunda, who was falsely accused of burning a Koran earlier this week. She was beaten to death and her body was burned by a mob in Kabul as police watched, according to Western press reports. Videos of her murder were circulated online.

As he did at the Pentagon on Monday, Ghani thanked U.S. troops for their sacrifices.

"We owe a profound debt to the soldiers who have lost limbs to buried bombs, to the brave veterans, and to the families who tragically lost their loved ones to the enemy's cowardly acts of terror," he said.

At a joint White House press conference with Ghani on Tuesday, President Obama announced that he was altering his withdrawal plan to allow about 9,800 U.S. troops to stay in Afghanistan to the end of this year, rather than reducing the troop strength to 5,500.

However, Obama also renewed his commitment to having all U.S. troops out, with the exception of about 1,000 for embassy security and other duties, before he leaves office in January 2017.

"That remains unchanged," Obama said.

Keeping 9,800 troops in Afghanistan this year will enable the U.S. to maintain bases in eastern Jalalabad and southwestern Kandahar that have been used by the CIA to gather intelligence and launch drone strikes.

Rep. Frank LoBiondo, R-N.J., a member of the House Intelligence and Armed Services Committees, said on C-SPAN Wednesday that "all of the great work that's been done" by the CIA at Jalalabad and Kandahar" would be lost if the bases were shut down. "It would be like turning the off switch," he said.