Under a deadly barrage of artillery fire, wave after wave of Union troops hurled themselves across an open field outside of Fredericksburg, Va., on a bitterly cold mid-December day and charged up a steep hill in a futile attempt to dislodge Confederates dug in atop Marye’s Heights.

By nightfall, nearly 13,000 Union troops lay dead or wounded – double the number of fallen Confederates – and a “young and good-looking” corporal from New Jersey that a comrade described as “a real soldierly, thoroughly military fellow,” was promoted to sergeant for bravery.

One month later, the sergeant, a veteran of the Seven Days Battle and Antietam, gave birth to a baby boy.

“What use have we for women, if soldiers in the army can give birth to children?” an astonished Col. Elijah H.C. Cavins, of the 14th Indiana, wrote to his wife.

The New Jersey sergeant, whose name and fate have been lost to history, was not the only woman disguised as a man fighting at Fredericksburg that day. Sarah Emma Edmonds, using the alias Pvt. Franklin Thompson, spent 12 hours on her horse, often under enemy fire, delivering dispatches as the orderly to Union Gen. Orlando Poe.

A teenage Lizzie Compton, whom fellow soldiers knew as Jack or Johnny, was discovered to be a woman only after the battle when military doctors peeled her blue uniform away to treat a shrapnel wound to her side. Discharged – it was illegal to serve in the military as a woman – Compton would go on to reenlist in and be discovered by six more regiments and serve in the Union army a total of 18 months.

In January, the Pentagon agreed to allow women to fight in combat. But what was ignored in that controversial debate was the long-forgotten history of hundreds of American women who had fought bravely in the nation’s wars, won battlefield citations for valor and died on the front lines.

Their ranks include Deborah Sampson, who served for 17 months in the Continental Army during the Revolutionary War as Robert Shurtliff, and Lucy Brewer, who served with the Marines aboard Old Ironsides as George Baker during the War of 1812. And historians have found that an estimated 400 to 1,000 women, perhaps more, disguised themselves as men and took up arms in the Civil War.

“We just lifted the ban on women in combat as if it were a new phenomenon. It’s not. said Elizabeth Leonard, a historian at Colby College in Maine who has studied women soldiers of the Civil War. “It’s that we let these stories disappear.”

DeAnne Blanton, a military historian at the National Archives, and Lauren Cook Wike have spent more than a decade meticulously combing diaries, letters, burial records, military reports and newspapers documenting the service of women soldiers.

In their book, “They Fought Like Demons,” they found evidence that at least 250 women dressed as men and fought for the North and the South in virtually every major battle of the bloody Civil War.

At least eight women combatants fought at Antietam. Catherine Davidson’s right arm was amputated. Mary Galloway was shot in the neck. A woman fighting for the Confederates died in the Cornfield at Antietam. Five women fought at Gettysburg. One Confederate woman was shot in the leg, and two were cut down in Pickett’s Charge.

Women soldiers fought in the First Battle of Bull Run. “There were a great many fanatic women in the Yankee army,” a Georgia Confederate wrote home, “some of whom were killed.” In fighting near Dallas in May 1864, several Confederate women soldiers were killed in an assault on Union lines. “They fought like demons,” Sgt. Robert Ardry of the 11th Illinois Infantry wrote to his father, “and we cut them down like dogs.”

Confederate Loreta Janeta Velazquez, disguised as Lt. Harry Buford, fought along with five other women soldiers in the Battle of Shiloh. Maria Lewis, an African-American passing as a white male soldier, served in the 8th New York Cavalry and “skirmished and fought like the rest,” a fellow soldier wrote. Four Confederate women were promoted to the rank of captain. At least one was a major.

“We know that because these women were hiding the fact that they were women, they were fully expected to do everything that any other soldier in the company was expected to do,” Blanton said.

“They didn’t get a pass because of their gender. They were hiding their gender.”

It was easy for women to infiltrate the Union and Confederate ranks. Although Army regulations required all recruits to have a physical, the examinations became cursory as each side became desperate for fresh troops. “Often, they’d just have recruits walk by,” Blanton said. “And if they weren’t lame or blind and if their trigger finger worked, they were in.”

(The Army became serious about entrance physicals in 1872, Blanton said: “The Civil War was really the last time women could sneak into the Army and pass herself off as a man.”)

Because so many soldiers were teenaged boys who had yet to shave, a woman’s beardless face went unnoticed. The ill-fitting uniforms hid their shape, most soldiers rarely bathed and everyone slept in their clothes.

When armies were camped out in the field, it would have been easy for these women to slip away into the woods to take care of bodily functions, Blanton surmised, and months of marching, poor nutrition and the stress of combat most likely interrupted many menstrual cycles.

Sometimes, just the fact that the women wore pants and acted in a way wholly unexpected in the prim, Victorian era of hoop skirts and fainting couches gave them cover. “I readily recall many things which ought to have betrayed her,” Poe, Sarah Edmonds’ commanding officer, later confessed, “except that no one thought of finding a woman in soldier’s dress.”

Their service became an open secret. Fellow soldiers wrote home about them and chronicled their exploits, if not their names, in their diaries. Stories romanticizing their adventurous spirits and extolling their patriotism appeared in the New York Times, the Richmond Examiner and the Chicago Daily Tribune. Edmonds and Velazquez penned popular memoirs.

“No editor can turn over a morning’s ‘exchange papers’ without encountering authentic anecdotes of some fair and fast Polly or Lucy who, led by the spirit of patriotism, love, or fun, has donned the blue breeches and follows the drum,” wrote the United States Service magazine.

But over time, the stories of these outed women soldiers were forgotten. And once the war was over, hundreds more who’d made it through undetected, learning to spit, smoke, chew tobacco, swear, play cards and swagger like a man, slipped out of their uniforms and into obscurity.

For nearly 50 years, the Adjutant General’s Office denied women soldiers existed.

For more than a century, only the family of Pvt. Lyons Wakeman, 153rd Regiment, New York State Volunteers, knew that the body buried in Chalmette National Cemetery near New Orleans was that of a woman, Rosetta Wakeman.

She’d died of dysentery, as many soldiers did, after a long, hot march from Alexandria, Va., to Louisiana.

Wakeman, who grew up on a farm, was working as a man on the canal boats before she enlisted. She was like many of the women soldiers Blanton has found – working-class city girls who toiled in factories or as seamstresses in the North for about $4 a month or semi-literate farm girls from both North and South.

“If you were being paid starvation wages as a woman, $13 a month, which was the Union Army pay for a private, sounded pretty good,” Blanton said.

Some women followed husbands or sweethearts into battle. Others, like Kentucky Confederate Mary Ann Clark, whose husband abandoned her and their two children, then took up with a new wife, left her kids with her mother and became Henry Clark to escape her sorrows.

“The fact that women were willing to risk injury, illness, maiming and even death to escape the kind of lives that were available to them at the time, tells you something about just how limited their choices were,” said Leonard of Colby College. “I’m as independent as a hog on ice,” Rosetta Wakeman wrote gleefully to her family. “I will dress as I am a mind to for all anyone else [cares], and if they don’t let me Alone they will be sorry for it.”