Updated

The battle-hardened Army commander nominated to take over U.S. military operations in Afghanistan warned senators Tuesday that if America leaves the fight too rapidly, there is a risk Islamic State militants could merge with al-Qaida and plan attacks against the U.S. or its allies.

Lt. Gen. Scott Miller, a former Army Delta Force commando who heads U.S. Joint Special Operations Command, told the Senate Armed Services Committee that, if confirmed, he'll reassess the troop numbers in Afghanistan to see if the force size is right.

Any abrupt U.S. withdrawal, he said, could trigger consequences similar to what happened in Iraq in 2015. Three years after the U.S. pulled all troops out of Iraq after negotiations with the government there failed, the Iraqi military collapsed and many forces ran or surrendered to the Islamic State group as it seized swaths of territory across the country.

"A disorderly and precipitous withdrawal would have negative effects on U.S. national security," Miller said. "I would be concerned about ISIS and al-Qaida's ability to merge and project external operations — one, because I know they want to, and I know they're constantly looking for that opportunity."

Miller is expected to be easily approved by the Senate. He would take control of a war that has dragged on for 17 years and led to frustration and pointed questions about America's path to success there.

Sen. Jack Reed, D-R.I., said Miller will be taking over at a critical time. Even as the U.S. has increased troop numbers and expanded programs to train and advise the Afghans. Reed said that independent assessments find few signs of progress and the Taliban continue to launch high-profile attacks.

"I understand our core goal in Afghanistan is to ensure terrorists can never again use Afghanistan as a safe haven to threaten the United States or other members of the international community," Miller said. "I believe military pressure is necessary to create the conditions for political reconciliation, so we enable the Afghans to build military capacity and they are better able to deny safe haven to terrorists."

Miller said that he believes there has been progress on the core objective of preventing al-Qaida and the Islamic State group from gaining sanctuary in Afghanistan and preventing external attacks against the U.S.

"I have seen firsthand the terrorist threats coming from Afghanistan, and I know what's at stake," he told the committee.

A graduate of the U.S. Military Academy at West Point and a veteran of numerous war tours, Miller said he has served about four years in Afghanistan. He said he never expected he would return there, 17 years after the conflict began.

As a member of the Army's elite Delta Force, Miller fought in Somalia in 1993 during the deadly battle made famous by the book and film "Black Hawk Down." He was wounded in battle in Somalia and received a Purple Heart and a Bronze Star with a "V," signifying heroism under fire. He also was wounded in Iraq in 2002, and received a second Purple Heart.

If confirmed by the Senate, Miller would be promoted to a full general. He would replace Gen. John Nicholson, who has led coalition forces in Afghanistan for more than two years and has overseen the latest increase in U.S. forces.