U.S. Defense Secretary Chuck Hagel arrived in Baghdad Tuesday to consult with Iraqi government officials and confer with U.S. commanders about the campaign to defeat Islamic State fighters.

Hagel, on what is expected to be his last overseas trip as Pentagon chief, landed at the Baghdad international airport under tight security. He is the first U.S. defense secretary to visit Iraq since Leon Panetta was here in December 2011 to mark the end of the U.S. military mission.

Hagel said Monday during a visit to Kuwait that he believes Iraq's security forces have gained a new momentum, thanks in part to sustained U.S. airstrikes against Islamic State militants.

The U.S. is committed to helping Iraq roll back the territorial gains the militants made earlier this year, but President Barack Obama has ruled out sending American ground combat forces. He maintains that any lasting solution in Iraq can only be carried out by a newly unified Iraqi government.

At the peak of the war in Iraq the U.S. had about 170,000 troops in the country. When it pulled out, in December 2011, U.S. officials said they believed Iraq was on track to long-term stability. There are about 1,650 U.S. troops in Iraq now.

Hagel was scheduled to meet in Baghdad with Prime Minister Haider al-Abadi and other government officiais.

During his stop in Kuwait, Hagel said the Islamic State group remains a formidable threat, not only to Iraq but also to neighboring Iran and other countries in the region. He repeated the U.S. government's policy of not coordinating military action in Iraq with Iran, but he also suggested that Iran has reason to be concerned about the long-term ambitions of the Islamic State.

"They are threatened by ISIL, just like every government in the Middle East is clearly threatened by ISIL," Hagel said, using an alternative acronym for the extremist group.

U.S. officials said last week that Iran had recently conducted airstrikes in the eastern Iraqi province of Diyala.

The top U.S. commander for the military campaign against Islamic State said in Kuwait on Monday that Islamic State fighters have lost the initiative in Iraq.

Lt. Gen. James Terry said the militants have far less ability to generate the kind of ground maneuvers that enabled them to capture large chunks of Iraq earlier this year.

Terry also said the nascent effort to rebuild Iraq's army will soon get a boost from coalition countries that are to commit roughly 1,500 military trainers. Much of the Iraq army collapsed or proved ineffective in the face of the Islamic State's onslaught last summer.

In his first extensive interview since taking command of the counter-militant campaign in October, Terry told a small group of reporters that the Islamic State is "on defense, trying to hold what they have gained." He added that the group, which is armed with tanks and other U.S.-made war equipment captured from the Iraqi army, is "still able to conduct some limited attacks."