As Nov. 8 and the anniversary of the presidential election approaches, Americans who care about civil rights will no doubt look back in dismay. From the election of a man who discriminated against black renters, to the appointment of an attorney general with a dismal civil rights record, to the unveiling of a travel ban for people coming to the United States from Muslim-majority countries, it has been a painful year.

But there is another anniversary coming up that offers hope to us: Nov. 5, which marks the 100th anniversary of the Supreme Court’s decision in Buchanan v. Warley. This little-remembered decision dealt a blow to Jim Crow at a time when segregation was flourishing in the South.

In 1914, Louisville implemented an ordinance prohibiting African Americans from occupying houses on majority-white blocks and whites from occupying houses on majority-black blocks. The ordinance was part of a regional trend. In 1910, Baltimore became the first to enact such an ordinance, followed by about a dozen other cities across the South over the next few years.

The lengthy title of Louisville’s ordinance contained its rationale: “An ordinance to prevent conflict and ill-feeling between the white and colored races in the city of Louisville, and to preserve the public peace and promote the general welfare, by making reasonable provisions requiring, as far as practicable, the use of separate blocks, for residences, places of abode, and places of assembly by white and colored people respectively.”

The “conflict” that city leaders sought to avoid was generally caused by white homeowners trying to drive off black home buyers. Tension arose not so much from having African Americans nearby — it was common for wealthier white families in the South to have black live-in servants, a situation that the Louisville ordinance allowed — as from having them nearby as equals. The ordinances were also meant to protect the value of white-owned property, which whites tended to dump on the market as soon as African Americans moved into their neighborhoods.

Louisville’s African American community, angered by the ordinance, formed a local NAACP chapter and carefully orchestrated a test case. Charles H. Buchanan, a white man sympathetic to the cause, sued William Warley, a black newspaper editor active in the local NAACP, for breach of contract. Warley had agreed to purchase Buchanan’s house but then backed out, citing a provision in the contract that said he would not have to purchase the property if he could not live on it. The property was on a majority-white block, so black buyers could not reside there; but it was near black-owned property, making it undesirable to white buyers.

This left Buchanan unable to sell his property to buyers of either race and thus, his counsel claimed, the ordinance deprived him of his property. Buchanan’s lawyers (one of them the president of the NAACP) argued that the city’s ordinance violated the 14th Amendment. Not because it violated the rights of African Americans — the lawyers didn’t think the Supreme Court would go for that — but because it was a violation of Buchanan’s property rights.

The court agreed and in 1917 declared the ordinance unconstitutional.

Ruling in Buchanan’s favor, the Supreme Court did not denounce segregation or make a statement in favor of the rights of African Americans. In fact, in his opinion explaining the ruling, Justice William R. Day explained that the court had repeatedly upheld racial segregation. But, he continued, “such legislation must have its limitations, and cannot be sustained where the exercise of authority exceeds the restraints of the Constitution.”

Soaring rhetoric this was not. And Buchanan v. Warley obviously did not end residential segregation. People who wanted residential segregation turned to restrictive covenants and zoning laws after the court’s decision, and the government did much to aid their cause, through policies like those providing generous loans to builders of racially restricted housing.

Because the Buchanan decision focused on the property rights of a white person, and because residential segregation marched on after the decision, it does not get much recognition as an important moment for civil rights. Yet Buchanan surely aided the civil rights cause by placing a limitation on segregation, drawing a line past which segregation enacted by law could not go. Civil rights activists at the time understood this and celebrated the decision.

Buchanan may not have demanded the full array of rights for African Americans, but the decision was a victory for African Americans and their allies nonetheless. If the court had let the ordinance stand, residential segregation ordinances probably would have proliferated throughout the South. That was the effect after the 1896 Plessy v. Ferguson decision, which ruled that separate public accommodations were legal so long as they were “equal.” After Plessy, segregation spread to many aspects of life in the South, from hospitals to cemeteries to drinking fountains. And as segregation spread, the public largely accepted these restrictions as natural.

So let’s raise a glass to Buchanan on its anniversary. It reminds us that we can find ways to win victories for what is right even when the prevailing winds are against us, and that even small gains matter, preventing bad situations from turning even worse.