On this day in 1861, Congress admitted Kansas to the Union as a free state, ending one part of a bloody struggle that ultimately would lead the nation to war.

The roots of the Kansas dispute ran back to 1853, when Senator Stephen Douglas, a Democrat from Illinois, sponsored legislation to organize much of the land left over from the Louisiana Purchase into the Nebraska Territory. There was a catch: the area in question sat north of the 36-30 line. Meaning that, based on the Missouri Compromise of 1820, it would be free soil. Southerners, jealously guarding the balance of power in Congress, blocked Douglas’s bill. They informed Douglas that if he wanted his Territory, he would have to end the ban on slavery there.

Douglas understood the implications of their request. But he nonetheless organized a new bill, in 1854, repealing the prohibition on slavery north of the 36-30 line and introducing two territories: Kansas and Nebraska. Although Northern legislators in both parties were appalled by this gambit, the bill passed. Some Northern Democrats, despite their misgivings, voted with Douglas. And Southern Whigs broke ranks with their party to insure the spread of slavery into new territory. Truman Smith, a Connecticut Whig who resigned from the Senate after Douglas’s legislation passed, said: “The Whig Party has been killed off effectually by that Nebraska business.” He was right. The Whigs never recovered, sacrificed upon the altar of slave power.

Abraham Lincoln, running for Congress in Illinois, found the Kansas-Nebraska Act intolerable. Lincoln was by no means an abolitionist. And he believed that black people were inferior to whites. But he argued that the founders had opposed slavery, never mentioning that word in the Constitution for the same reason that

an afflicted man hides away a wen or a cancer, which he dares not cut out at once, lest he bleed to death; with the promise, nevertheless, that the cutting may begin at the end of a given time.

For Lincoln, the time of cutting had not yet come. But the Kansas-Nebraska Act moved him and the country toward that moment of reckoning. In the interim, Lincoln argued, slavery must not be allowed to spread into the West.

Lincoln wouldn’t call himself a Republican for another year, but he already articulated the new party’s platform: slavery was morally wrong, a cancer that poisoned the body politic; immediate abolition was too precipitous, but a move toward emancipation was necessary; and Western soil must remain free.

In Kansas, meanwhile, the question of slavery would be decided by popular sovereignty, a cornerstone of the Compromise of 1850. Pro-slavery migrants from Missouri and free-soil settlers from throughout the Midwest flooded the territory, trying to form an electoral majority. As William Seward, then serving in the Senate, remarked: “We will engage in competition for the virgin soil of Kansas, and God give the victory to the side which is stronger in numbers as it is in right.”

The competition, unfortunately, never was divine; instead it was bitter and violent. Kansas began to bleed. After a series of unfair elections, marred by voter fraud and intimidation, the territory found itself early in 1856 with two governments: a free-soil legislature in Topeka, and a pro-slavery body in Lecompton.

By the spring of 1856, national attention fixed on Kansas. Congress debated two separate bills — one free-soil, the other pro-slavery — to admit the territory as a state. On May 19-20, abolitionist senator Charles Sumner delivered his address “The Crime Against Kansas.” He described pro-slavery ruffians as “hirelings picked from the drunken spew and vomit of an uneasy civilization” engaged in “the rape of a virgin territory.” More inflammatory still, he mocked Andrew Butler, a disabled senator from South Carolina, for “the loose expectoration of his speech,” and for having “chosen a mistress to whom he has made his vows…the harlot, Slavery.”

Back in Kansas, the next day a mob of pro-slavery partisans rolled into the town of Lawrence, a free-soil stronghold, burning buildings and destroying the offices of the local newspapers. And the day after that, in Washington, Preston Brooks, a congressman from South Carolina and Andrew Butler’s cousin, found Charles Sumner in the Senate chamber and caned the abolitionist lawmaker nearly to death.

Reaction hinged on region. Most Northerners were outraged, both by what became known the “Sack of Lawrence” and the caning of Sumner. Many Southerners, though, sent Brooks new canes, engraved with catchy slogans like: “Hit Him Again.” The disparity in responses became a symbol of how divided the nation had become.

Then John Brown came on the scene. A messianic abolitionist, Brown had moved to Kansas to help secure it as free territory. He and a band of followers had planned, in mid May, to rush to the aid of Lawrence. While on the way, though, they heard the town had fallen and that Sumner had been caned. Brown flew into a rage, embracing biblical justice gone mad. He and his men kidnapped five pro-slavery settlers near Pottawatomie Creek on May 24-25 and then hacked them to death with broadswords.

After Brown escaped without punishment, the violence in Kansas first escalated and then cooled. But it didn’t end. A guerilla war raged there for years, exacerbating sectional tensions and serving as a wellspring for unrest nationwide.

Against that backdrop, Kansas sought statehood in 1857, under the pro-slavery Lecompton Constitution. That document had passed a territorial convention only after free-soilers boycotted the proceedings. Despite that, President James Buchanan urged Congress to welcome Kansas into the Union as a slave state. But Stephen Douglas intervened, labeling the Lecompton Constitution the fruit of “trickery and juggling.” Despite Buchanan’s threats to destroy his career, Douglas helped kill statehood for Kansas. In the course of their power struggle, Buchanan revealed himself, yet again, as a tool of the slaveocracy. Douglas, by contrast, distinguished himself as a patriot genuinely committed to legitimate popular sovereignty.

John Brown, meanwhile, having acquired a taste for blood, attracted new followers. With the financial backing of elite New England abolitionists, including Thomas Wentworth Higginson, Theodore Parker, and Samuel Gridley Howe, Brown prepared, in October 1859, to attack the federal armory at Harper’s Ferry. An army of slaves would rally to him, Brown believed, and together he and his force of thousands would break over the South, a purifying wave of vengeance, eradicating the Peculiar Institution. Instead his campaign failed. But Brown went to gallows with dignity. And became a martyr, bringing the nation one step closer to war.

The Democratic Party then became another casualty of the violence in Bleeding Kansas. The feud between Buchanan and Douglas split Democrats along sectional lines, paving the way for the election of a Republican president, Abraham Lincoln, in 1860. Which, in turn, led to secession and finally to the Civil War. But before Fort Sumter fell, Congress finally admitted Kansas to the Union on this day in 1861.