U.S. Defense Secretary Jim Mattis said Tuesday he is confident that U.S.-backed Iraqi forces will finish off the Islamic State militants clinging to strongholds that are shrinking in size and number.

"ISIS is on the run," Mattis told reporters after meeting with Prime Minister Haider al-Abadi and other Iraqi government leaders. "They have been shown to be unable to stand up to our team in combat."

Mattis spoke alongside Lt. Gen. Stephen Townsend, the top U.S. commander in Iraq, who is due to finish his tour of duty here in early September.

"The fighting is tough," Townsend said, "but the momentum is with our partners."

Earlier, Mattis described the extremists as being trapped in a military vise that will squeeze them on both sides of the Syria-Iraq border.

Mattis had arrived in the Iraqi capital hours after President Donald Trump outlined a fresh approach to the stalemated war in Afghanistan. Trump also has pledged to take a more aggressive, effective approach against IS in Iraq and Syria, but he has yet to announce a strategy for that conflict that differs greatly from his predecessor's.

The Pentagon chief told reporters before he left neighboring Jordan that the Middle Euphrates River Valley — roughly from the western Iraqi city of al-Qaim to the eastern Syrian city of Der el-Zour — will be liberated in time, as IS takes hit from both ends of the valley that bisects Iraq and Syria.

"You see, ISIS is now caught in-between converging forces," he said, using an alternative acronym for the militant group that burst into western and northern Iraq in 2014 from Syria and held sway for more than two years. "So ISIS's days are certainly numbered, but it's not over yet and it's not going to be over any time soon."

Mattis referred to this area as "ISIS's last stand."

Unlike the war in Afghanistan, Iraq offers a more positive narrative for the White House, at least for now.

Having enabled Iraqi government forces to reclaim the Islamic State's prized possession of Mosul in July, the U.S. military effort is showing tangible progress and the Pentagon can credibly assert that momentum is on Iraq's side.

The ranking U.S. Air Force officer in Iraq, Brig. Gen. Andrew A. Croft, said that over the past few months, IS has lost much of its ability to command and control its forces.

"It's less coordinated than it was before," he said. "It appears more fractured — flimsy is the word I would use."

It seems likely that in coming months Trump may be in position to declare a victory of sorts in Iraq as IS fighters are marginalized and they lose their claim to be running a "caliphate" inside Iraq's borders. Syria, on the other hand, is a murkier problem, even as IS loses ground there against U.S.-supported local fighters and Russian-backed Syrian government forces.

The U.S. role in Iraq parallels Afghanistan in some ways, starting with the basic tenet of enabling local government forces to fight rather than having U.S. troops do the fighting for them. That is unlikely to change in either country.

Although the Taliban is the main opposition force in Afghanistan, an IS affiliate has emerged there, too. In both countries, U.S. airpower is playing an important role in support of local forces, and the Pentagon is trying to facilitate the development of potent local air forces.

In Iraq, the political outlook is clouded by the same sectarian and ethnic divisions among Sunni, Shiite and Kurdish factions that have repeatedly undercut, and sometimes reversed, security gains following the toppling of Saddam Hussein's government in 2003.

An immediate worry is a Kurdish independence referendum to be held Sept. 25. If that's successful, it could upset a delicate political balance in Iraq and enflame tensions with Turkey, whose own Kurdish population has fought an insurgency against the central government for decades. McGurk reiterated U.S. opposition to holding the Iraqi Kurdish referendum.

With Iraqi troops on Tuesday reaching the first urban areas of the IS-held northern town of Tal Afar on the third day of an operation, Mattis has refused to predict victory. He said generals and senior officials should "just go silent" when troops are entering battle.