We know D.C. Get our free newsletter to stay in the know.

Alexander Gardner, a photographer best known for his Civil War-era work, produced an important body of images during this crucible of American history. But in “Dark Fields of the Republic,” a major retrospective at the National Portrait Gallery, the man behind the camera comes across as a complicated figure.

One sees flashes of brilliance in his portrayal of key figures of the era and in his genuine pathos for the death that became all too common during the war. Yet one also sees a tendency toward career calculation, and evidence of deliberate manipulation to improve impact.

Gardner (1821–1882) was a Scottish émigré who found work with Matthew Brady, a leading photographer, in the late 1850s. Gardner was picked to direct Brady’s D.C. studio, putting him in proximity to political and military leaders as the war was looming.

The exhibit takes its title seriously—the walls are literally dark, painted melancholy shades of blue, and lighting is kept low. Its main poster features a pile of war dead, and the captions are admirably detailed, transporting visitors back to what the exhibit aptly calls a “darkly turbulent period in American history.”

The collection of portraits offers a mix of familiar faces (a steely-eyed Ulysses S. Grant and a tightly wound William Tecumseh Sherman) and lesser-known figures (Seminole leader Billy Bowlegs; Confederate spy Rose O’Neal Greenhow; and John Wilkes Booth conspirator Lewis Powell, exuding the bad-boy charisma of a teen idol).

The Civil War, naturally, is the exhibit’s pivot point. The images of dead bodies represent a small fraction of the works on display, but even a century and a half later, they are punches to the gut, particularly when shown in three-dimensional “stereograph” format. The exhibit correctly places Gardner’s work in the context of a “change under way in American culture from romanticism to realism.”

Still, it’s no secret that Gardner was prone to manipulating the scenarios he found, most famously (or infamously) in “Home of a Rebel Sharpshooter, Gettysburg,” one of the works included in the exhibit. The dead Confederate soldier shown was supposedly in his sniper’s nest, but later analysis has demonstrated that someone, believed to be Gardner, staged the scene, moving the corpse and providing a rifle where none was initially found. The exhibit’s curators call such pathos-heightening actions “unforgivable,” even as they acknowledge “how difficult it was to Gardner and his contemporaries to process the reality of mass casualties.”

Indeed, Gardner, despite his accomplishments, comes across as an imperfect historical figure. We first see him in a rather bizarre self-portrait wearing an ostentatious “mountain man” outfit. He feuded with Brady, his mentor and rival, even as the war was raging. He displayed some questionable artistic tactics, such as “hand-tinting” flames on a print documenting a fire at the Smithsonian Castle in 1865; they are as ham-handed as the botched “beast Jesus” restoration of a religious fresco in Spain.

The career move that bequeathed the richest historical dividends was Gardner’s relentless effort to attach to himself to Abraham Lincoln. This not only gave him periodic, intimate studio sessions with the president, but also access to the front lines, where he could photograph the military elite in situ. The presidential portraits chart the course of the war as accurately as any map could: a surprisingly detailed 1861 portrait in which the president hides hands swollen from greeting well-wishers; a pathos-filled image of Lincoln with his doomed son Tad; and a famed “cracked plate” print taken shortly before Lincoln’s death, showing his furrowed cheeks in a narrow plane of focus. It’s a historically significant image that’s also artistically unsparing.

While Gardner continued to make photographs of the American West and Native Americans for several more years after this period, that work is mere afterthought to the powerful narrative arc of Lincoln and the war. The final time Gardner’s connection to the late president paid off was when he was chosen as the only photographer to record the hanging of several conspirators. His three-part, elliptical chronicle of their execution, ending with their lifeless bodies, is composed with sparseness and a haunting eloquence.

8th and F streets NW. Free. (202) 633-8300. www.npg.si.edu.