The recent collapse of the Iraqi army is due in part to failures by Iraqi leaders that predate the U.S. withdrawal in 2011, the former commander of U.S. troops in northern Iraq said Wednesday.

By the time most U.S. troops left Iraq in December 2011, the Iraqi military was capable of conducting internal security, but Iraqi leaders were overly confident, said retired Army Lt. Gen. Mark Hertling.

“It wasn’t that we just left — we were asked to leave,” said Hertling, who commanded Multinational Division-North from September 2007 until December 2008. “Some of the things that were going at the time, I think many of the [U.S.] commanders on the ground were saying, ‘Hey, you don’t quite have it as best you should,’ and I think some of the Iraqis responded with, ‘We’ve got it good enough.’ ”

Even in 2008 — three years before the U.S. withdrawal — Iraqi commanders did not appreciate the extent to which their military’s capabilities to conduct operations depended on U.S. support, said Hertling, who went on to become the chief of U.S. Army Europe before retiring in November 2012.

“When we were teaming with them, it was pretty good,” he said. “We were attempting to lead from the rear and let them take some of the credit. I think, in many cases, the Iraqi army was doing some good things, but some of the government officials were too quick to claim some of the credit that they were doing it all by themselves. They didn’t really quite understand that there was a lot of help behind the scenes going on with intelligence, with close-air support.”

Hertling recalls going on a mission with Iraqi soldiers, who were flown to their destination in U.S. CH-47 Chinook helicopters.

“They did pretty good, but they also had our CH-47s, and they also had our close-air support, and they also had the assistance of our intel guys telling them where to go and where the enemy was,” he said.

A combination of other factors helped create the conditions for the Iraqi military to abandon Mosul and much of northern Iraq in the face of a vastly smaller force of Sunni insurgents, Hertling said.

For years, the Iraqi government under Prime Minister Nouri al-Maliki has been undermining the Iraqi military’s leadership by replacing good Sunni and Kurdish commanders with less capable Shiite officers with ties to the Maliki government, Hertling said. Any organization, including a unit in the U.S. Army, would deteriorate under toxic leadership.

“Even as I was leaving, those Sunni leaders were being replaced by people that didn’t know Mosul; commanders that didn’t know Talafar; they didn’t know the ground and they didn’t know the people,” he said.

The central government has compounded the Iraqi military’s problems by neglecting the people in northern Iraq, making them feel like second-class citizens, Hertling said.

Not only are Iraqi troops operating under these difficult conditions, but the Sunni insurgents they face are a fearsome enemy committing atrocities that outdo even al-Qaida, he said.

“When you know they’re going to conduct extrajudicial killings like they are doing, it’s tough to stand your ground. You don’t want to be the guy left alone with some of these really bad dudes — and they are extremists.”

As things now stand, Hertling does not believe there is much the U.S. can do in the short term to get the Iraqi military back on its feet.

“This is going to take a complete revamping,” he said. “It’s up to them to do that. There was a time where we made the decision to take the training wheels off because they asked us to. We left the country because they said, ‘We don’t need your help anymore.’ That seems to be the convenient thing a lot of Americans are forgetting.”