LANGLEY, Va. — President Obama claimed progress Wednesday in the U.S.-led fight against the Islamic State group, even as political turmoil in Iraq and renewed violence in Syria threatened to jeopardize hard-fought gains.

During a rare presidential visit to CIA headquarters, Obama said it had been “a bad few months” for the Islamic State and gave a detailed account of areas where U.S.-backed forces have wrested territory back from the extremist group, which is also referred to ISIS or ISIL. Though he acknowledged the fight remains difficult and complex, he said the extremists are on the defensive and that the U.S. intends to “keep that momentum.

Obama offered no new steps or specifics about how the U.S. will beef up the fight against the extremists, although U.S. officials have suggested those steps are in the works. Defense Secretary Ash Carter has said the Pentagon is seeking ways to increase military support for the fight, including a likely increase in U.S. forces, along with the possible use of Apache helicopters for Iraqi-led combat missions.

The visit to the CIA’s campus in suburban Virginia was designed to assure Americans that the U.S. is fully engaged in the fight, despite persistent complaints from Obama’s critics that his strategy isn’t aggressive enough.

Though Obama gave an optimistic portrayal of progress in both Iraq and Syria, the picture on the ground remains muddled at best.

In Syria, escalating fighting between the government and militants has threatened to jeopardize a fragile cease-fire the U.S. and Russia brokered earlier this year.