"Glimpses at the Freedmen's Bureau. Issuing Rations to the Old and Sick,” from a sketch by James E. Taylor published in Frank Leslie's Illustrated Newspaper on Sept. 22, 1866, shows African Americans gathered outside the Freedmen's Bureau in Richmond. A woman is handing a slip of paper through a window to a man seated inside. Similar facilities existed in Washington. (James. E. Taylor /LIBRARY OF CONGRESS PRINTS AND PHOTOGRAPHS DIVISION)

Emancipation was in the air, and Elizabeth Keckley knew it. A former slave herself, she had become dressmaker and confidante to first lady Mary Todd Lincoln, and she was well settled in Washington society by the time the Civil War began. But the plight of other African Americans in the city pained her.

“They came with a great hope in their hearts, and with all their worldly goods on their backs,” wrote Keckley, who bought her and her son’s freedom, in her memoir, “Behind the Scenes.” But “the North is not warm and impulsive. The bright joyous dreams of freedom to the slave faded — were sadly altered in the presence of that stern, practical mother, reality. Poor dusky children of slavery, men and women of my own race — the transition from slavery to freedom was too sudden for you!”

Washington in the early war years continued to be riven by the fault lines of race and politics. A decade earlier, Congress had abolished slave trade in the District but not slavery itself. Domestic, governmental and service jobs attracted African Americans from Maryland and Virginia, where restrictions were greater.

“By the time of the war, slavery had been diminished considerably,” said Lincoln scholar Edna Medford of Howard University. “Of the 14,000 people of color in the city, fewer than 3,200 were enslaved.”

Still, in 1861, free blacks — lawyers and laborers, midwives and ministers, doorkeepers and educators — had to navigate past slave pens, and slave catchers patrolled Washington for fugitives.

“Right here, in the bedrock of this great nation, was a contradiction, this horrible situation,” said Frank Smith, director of the African American Civil War Memorial and Museum.

“Free blacks endured injustices such as a 10 p.m. curfew and morality laws, which sought to legislate black behavior — no swearing in public or gambling or card-playing, et cetera, no political rights,” Medford said. “Free blacks had to prove their free status and had to carry certificates of freedom at all times. They also had to enter into bonds with five respected members of the community who were willing to ensure their good behavior. Nor could blacks testify against whites in court.”

The punishments were fines, jail and whippings. If no one came to bail out free arrestees, “they would be sold to pay the cost of their jail fees,” historian C.R. Gibbs said.

A push for emancipation

By the end of 1861, the situation in the capital had become untenable. Escapees from Southern states arrived without housing, jobs or money. While the city wrestled with how to care for them, fugitive slaves from Maryland were being hunted down and locked up, because federal law still protected slavery in states loyal to the Union.

“Union soldiers marching through Maryland to protect the capital in the spring of 1861 — that was destabilizing to slavery,” said Kate Masur, a Northwestern University history professor and author of “An Example for All the Land: Emancipation and the Struggle Over Equality in Washington, D.C.” “A lot of enslaved people took the opportunity to run away.”

Antislavery members of Congress protested loudly about the treatment of escaped Maryland slaves and received support from the Northern press. A movement for emancipation took hold. Over the objections of the Washington city council, all slaves in the District were finally freed in April 1862 — and their owners compensated by the federal government.

In time, the government organized camps to provide shelter — first on Capitol Hill, then Camp Barker in the area that became the U Street corridor, and eventually in a Freedman’s Village in Arlington County. Clergy and volunteers provided services and schooling. And as more black men served in the army, the camps “became points of recruitment,” Masur said. “They were important incubators of freedom.”

In an appeal to Northern sympathizers published in September 1862 in the Boston-based abolitionist newspaper “The Liberator,” Harriet Jacobs, an escaped slave, reported the conditions of the “contrabands.”

“I went to Duff Green’s Row, government headquarters for the contrabands here. I found men, women and children all huddled together without any distinction or regard to age or sex. Some of them were in the most pitiable condition,” Jacobs wrote. “Many were sick with measles, diptheria, scarlet or typhoid fever. Some had a few filthy rags to lie on, others had nothing but the bare floor for a couch. . . . Some of them have been so degraded by slavery that they do not know the usages of civilized life: they know little else than the handle of the hoe, the plough, the cotton pad, and the overseer’s lash.”

It was people such as Keckley and Jacobs who stepped up to help.

“Each one attempted to care for the needs of African Americans in the communities where they lived,” Medford said. “Keckley, for instance, helped to establish the Contraband Relief Fund.” Jacobs established a school for freedmen in Alexandria. Itinerant preacher Sojourner Truth worked first at Freedman’s Village and later at Freedman’s Hospital, the forerunner of Howard University Hospital.

Struggling for equality

At the end of the war, an entire federal agency, the Freedmen’s Bureau, was created to deal with education, welfare and jobs. A special 1867 Census ordered by Congress counted 31,937 free and emancipated blacks in the District, double the number before the war.

Thousands were engaged in loading and unloading supplies from docks and helping to build military hospitals. They were “vital contributors to the war effort,” according to Leslie Rowland, a history professor at the University of Maryland.

While some free blacks devoted themselves to improving life for their newly liberated brethren, others worked to sign them up in the war effort. Men such as the Rev. Henry Highland Garnet, pastor of Fifteenth Street Presbyterian Church, and Gurden Snowden, an early trustee at Asbury Church, rallied black men to enlist in the city’s First Regiment of the U.S. Colored Troops.

By spring 1863, the unit had become the first black regiment directly mustered into federal service (as opposed to those bearing state charters), said Gibbs, author of “Black, Copper, and Bright: The District of Columbia’s Black Civil War Regiment.” It drew men from California, Canada and the Caribbean.

Yet, even as they fought for their country and freedom, the men struggled for equal pay and recognition for valor from white officers and fellow soldiers. In summer 1863, abolitionist Frederick Douglass met with the president about their treatment. Lincoln “listened with patience and silence to all I had to say,” Douglass wrote in his autobiography, “The Life and Times of Frederick Douglass.”

“He began by saying that the employment of colored troops at all was a great gain to the colored people; . . . that they had larger motives for being soldiers than white men; that they ought to be willing to enter the service upon any conditions; that the fact that they were not to receive the same pay as white soldiers, seemed a necessary concession to smooth the way to their employment at all as soldiers; but that ultimately they would receive the same.”

But if Lincoln sometimes disappointed, at other times he demonstrated a powerful kinship.

Mary Dines was a former slave who lived at Camp Barker, on the route between the White House and the Soldiers’ Home where Lincoln stayed during the summers.

Aunt Mary, as she was known, gave several contemporary accounts of her encounters with the president. (Some scholars have doubted her accounts, questioning the frequency of Lincoln’s visits.) Once, at a performance for visiting dignitaries, she said, Lincoln stood not with the visitors but beside the camp’s elders.

As they sang, she saw him “wiping the tears off his face with his bare hands.”

“[M]any of the real old folks forgot about the president being present and began to shout and yell, but he didn’t laugh at them, but stood like a stone and bowed his head.”

In a “sweet voice” that sounded “so sad,” he joined the chorus. “Lincoln did just like everybody else,” Dines said. “He was no president when he came to camp.

“He stood and sang and prayed just like all the rest of the people.”

This story was included in a Washington Post special section, “Ripples of War.” See more stories on the Civil War.