The next wave of American troops will begin moving into Iraq in a couple of weeks to train local forces, the top U.S. commander for the mission said Thursday while cautioning that it will take at least three years to build the capabilities of the Iraqi military.

Army Lt. Gen. James Terry, who is leading the U.S. campaign to defeat Islamic State militants in Syria and Iraq, said the challenge is to get Iraqi units trained and back into the fight so they can plan operations to regain contested areas such as Mosul.

He said that while there has been progress in halting the militants' charge across Iraq, "I think what we must do, especially inside of Iraq, is continue to build those (Iraqi) capabilities. I think you're at least talking a minimum of three years."

The Iraqi army wants to launch a counteroffensive to retake Mosul, the largest city in northern Iraq, and the U.S. likely would help. While there have been some concerns that Iraq's military may not be ready yet for such an ambitious operation, Defense Secretary Chuck Hagel said last week that the U.S. is working with senior Iraqi leaders on preparations.

"Part of the planning has to be how you generate force to do operations," Terry told reporters during a briefing in the Pentagon. The question, he said, is "how do you get into a place where you can generate some capability, pull some units back so that you can make them better, and then now start to put those against operations down the road."

He declined to reveal when a Mosul operation might be launched. There have been fewer details and more limited media access to U.S. military operations in Iraq this time than during the eight years of war that ended in 2011. U.S. officials say it's because the military is there only to advise and assist the sovereign Iraqi government.

There are currently about 1,700 U.S. troops in Iraq, and President Barack Obama has authorized up to 3,000.  More than 1,000 U.S. troops are expected to be deployed in the coming weeks to increase the effort to advise and assist Iraq units at the higher headquarters levels and also to conduct training at several sites around the country.

Terry also offered an optimistic view of the Shiite-dominated Iraqi government's progress in working more with the Sunni tribes.

The deep sectarian divide fueled the advances of the Islamic State militants across Iraq earlier this year as grievances led some align with the extremists. U.S. officials have stressed that ongoing coalition assistance hinges in part on whether the Iraqi government becomes more inclusive.

The U.S. and Iraqi governments have proposed creating a national guard program that would arm and pay tribesmen to fight. Terry said Thursday that as the Iraqis conduct more combat operations in Sunni strongholds such as Anbar, there will be more opportunities to bring tribal members into the fight.

He said the national guard effort is starting and that he is optimistic the Iraqi government will approve legislation needed for the program to move forward.