Sometimes they succeeded in having it both ways, forcing Northern-based businesses to abide by local “customs,” regardless of any moral qualms (which may or may not have worried Northern businessmen) or economic inefficiencies (which most certainly did). In 1933, the Hattiesburg Chamber of Commerce persuaded Reliance Manufacturing, a Chicago-based company, to build a factory in town. The chamber’s representatives were elated. One of them told the audience gathered for the plant’s opening that the building was “an expression of your humanity” — even though, as Sturkey points out, “only white people were allowed to work there.”

But material self-interest wasn’t always so compatible with the voracious demands of Jim Crow. During the depths of the Great Depression, with Hattiesburg relying on charitable donations to feed people, the mayor issued an ultimatum to the Red Cross: Forgo its nondiscrimination policy and stop serving African-Americans, or else vacate its offices at City Hall. (The Red Cross refused and was kicked out.) The Philadelphia Tribune was mildly incredulous at the audacious display of brinkmanship: “Even the gnawing pains of hunger are unable to make the white people of that God-forsaken section forget their white supremacy.”

One imagines that Hattiesburg’s black residents were less surprised — they had been contending with some of the most destructive manifestations of racism for their entire lives. Sturkey traces the story of Turner Smith, who moved with his wife, Mamie, and their children to Hattiesburg in 1900. Turner was born into slavery and emancipated as a toddler; even though he and Mamie were both trained as teachers, post-Reconstruction Mississippi continually cut funding to black schools, so Turner worked as a carpenter and Mamie as a laundress.

Some black Hattiesburgers used their earnings to move north as part of the Great Migration; an exodus to Chicago during the early part of the 20th century took with it roughly half of the town’s black population, leading some desperate white business owners to beg their black workers to stay. Other white proprietors tried scare tactics, warning of Chicago’s supposedly deadly cold. “Well I, for one, am glad that they had the privilege of dying a natural death,” one migrant said. “That is much better than the rope and torch.”

Any gains in black mobility and financial independence were fragile, vulnerable to a racial hierarchy that asserted its authority in cruel, capricious ways. But even modest and precarious improvements, Sturkey argues, were nevertheless real. Four of Turner and Mamie’s sons became doctors; one of them owned a pharmacy in town and held N.A.A.C.P. meetings in the back room.

Sturkey’s cleareyed and meticulous book pulls off a delicate balancing act. While depicting the terrors of Jim Crow, he also shows how Hattiesburg’s black residents, forced to forge their own communal institutions, laid the organizational groundwork for the civil rights movement of the ’50s and ’60s.

When describing a voter-registration drive that resulted in ostensible failure — the county registrar refused to register the applicants, but their efforts created a useful paper trail — Sturkey explains the necessity of such incremental and painstaking work: “Every attempt mattered. Each added to the total.”