Image caption Graduates from the US Army's college at West Point, New York

During and after the Iraq war, many Army officers left because of the US military's gruelling pace. Now, officials are struggling with the consequences.

It is a March morning, cold and bright. The air smells like freshly mown grass at Fort Belvoir, Virginia, just outside Washington DC.

Inside a classroom in an old school, a red-brick building on Belvoir Road, blinds are pulled shut to keep out the sun.

The classroom is filled with Iraq veterans, including Capt Jason Allen, a 31-year-old engineer with pale blue eyes and a boyish face.

He once looked for homemade bombs on roads in Anbar, a province where more than 1,300 American troops died.

He and the other students are learning about military doctrine in an educational programme for officers.

During class, someone mentions the Iraqi city of Falluja, where American contractors were once killed and strung up from a bridge.

Nobody spent three years in Vietnam. We don't have young men who have seen this much combat since the American-Indian wars Douglas Ollivant, Retired Army officer

The seminar leader, Zsolt Szentkiracli, changes the subject.

He says later that he tries to steer people away from Iraq. Instead, he encourages them to look at the UK's war with Argentina over the Falkland Islands.

Szentkiracli says Iraq is too "emotionally charged" for the seminar. Memories of the war haunt the room. One of its legacies is a gutted officer corps.

Capt Allen and his classmates are exceptional: they are smart, ambitious officers, many of whom served in Iraq. Equally important, they have decided to stay in the Army.

Capt Allen says his job is "to do the best I can for soldiers - to absolutely take care of them".

The war in Iraq is over for Americans, and troops are coming home from Afghanistan. So many officers have retired in recent years, though, that military leaders are now scrambling to make up for the loss.

Defence analysts say that the reasons for the current disarray in the army - and the concerns for its future - are rooted in the years of conflict.

There have been departures from the military at all levels. David Petraeus, who reshaped the US armed forces' entire approach to counter-insurgency, retired in 2011 and became CIA director. He left the CIA last year because of an extramarital affair.

Gen Stanley McChrystal, the former head of Joint Special Operations Command (JSOC), the top-secret unit that tracked down Osama Bin Laden, lost his job in 2010 because of a Rolling Stone interview.

In the article, Gen McChrystal's staff were quoted as speaking dismissively about Vice-President Joseph Biden and other officials.

After both of their exits, many officers wondered about the future of the military.

Others were exhausted by the "optempo," the gruelling pace of military operations - and Army life.

After Anbar, Capt Allen went to Baghdad and then Afghanistan, serving a total of three years in combat.

Douglas Ollivant, a retired Army officer who served in Falluja in 2004, says: "Nobody spent three years in Vietnam.

"We probably don't have young men who have seen this much combat since the American-Indian wars."

Image caption David Petraeus created a leadership vacuum at the top when he quit because of an affair

Now that the Iraq war is over, some feel that they no longer have a place in the military.

"Do you want to spend the next 10 years of your life practising when you've spent the last 10 years experiencing real bullets and real guns?" Ollivant says.

"It's a perverse version of, 'how do you keep 'em down on the farm after they've seen Paris?'"

Christopher Fussell, 40, a former Navy Seal, says: "I spent 10 years of my life in JSOC.

"I saw a future of nuanced policy debates and granular discussions about who's going to have what title. I just wasn't into it."

He is now trying to navigate the business world: he works for a consulting group run by Gen McChrystal.

For those who remain, the military is a stripped-down machine.

Commanding officers and soldiers are facing a "persistent conflict", as officials describe an ongoing battle against al-Qaeda and allied groups, with less manpower and fewer resources.

Those who are sent into unstable parts of the world to fight militants have to work harder, completing more missions in less time.

Cutting corners is not easy - but a necessary task when so many officers have left.

When too many officers leave, military leaders are forced to ramp up their rates of promotion, according to a 2010 US Army War College paper. As a result, the length of time allocated to training is shortened.

In 2001, each officer spent 15 months as a platoon leader. By 2006, they were spending only 10.5 months in that role.

The accelerated process "undercuts the Army's ability to discern which officers possess the talent it needs", according to the authors of the paper.

Image caption Roadside bombings, like this one in Iraq, took their toll on members of the military

Another officer in the Fort Belvoir seminar, a 34-year-old Army major who specialises in psychological operations, says about 20 officers - half his classmates from a 2007 course at Fort Bragg, North Carolina - have since left the Army. He asked not to be identified because of the sensitive nature of his work.

"We lost more of the cream of the crop as opposed to folks who would get weeded out," he says.

When officers drop out, those who remain have to scale back.

"There's only so many things we can do," he says. "Eventually, we start turning operations off."

Not everyone sees the situation in dire terms. A Pentagon spokesman says there has been little change in "officer separations levels", as he puts it.

The numbers have remained relatively stable over the past decade, according to the spokesman, Lt Cdr Nate Christensen, who works in the office of the assistant defence secretary.

He says 14,364 officers left the Army in fiscal year 2003. In fiscal year 2012, 17,794 officers quit.

Tim Kane, author of the 2012 book Bleeding Talent, says statistics hide what is really happening: the smart ones leave.

But he says it is not just the war that drives them out.

Media playback is unsupported on your device Media caption Iraq war: How the year US troops served defined what they saw

"In the military, they manage their personnel terribly. They treat human capital like a logistics problem, so any captain is interchangeable with any other captain," he says.

"People rotate quickly, and you're constantly sending in green people to do a job," he says.

"It's very common for someone who's been in the military for 20 years to have moved 22 times."

Capt Allen says he has thought about leaving the Army.

He and his wife have two daughters, a six-month-old and a five-year-old. He doesn't like to be away for military duty; he misses his children.

"I don't deny it: it has been a very big challenge for our family," he says.

Still, he hopes someday to become a battalion operations officer.

"In peacetime and in wartime, you're taking care of soldiers," he says. "It doesn't change."