John L. Cashin Jr., a dentist and civil rights leader who in 1970 became the first African American to run for Alabama governor since Reconstruction, died March 21 of acute renal failure at the Specialty Hospital of Washington-Hadley in the District. He was 82.

His opponent in the 1970 race was former governor George C. Wallace, a hard-line segregationist who in 1963 had tried to block two black students from enrolling at the previously all-white University of Alabama.

Dr. Cashin lost to Wallace in a landslide, winning about 15 percent of the vote. Wallace went on to serve a total of four terms as Alabama governor and eventually renounced his anti-civil rights views.

Though Dr. Cashin didn’t hold office, his political and legal wrangling in the 1960s and 1970s helped usher a wave of black candidates into office.

In the late 1960s, Dr. Cashin founded the National Democratic Party of Alabama (NDPA), a splinter party to support black politicians. At the time, Alabama’s Democratic party was dominated by Wallace and other segregationists who refused to let black candidates run.

Dr. Cashin recruited candidates and campaigned on their behalf, financing much of the party’s work with his own money.

In 1968, when Alabama refused to allow NDPA candidates to appear on ballots, Dr. Cashin filed suit against the state. The case went to the U.S. Supreme Court, which ordered the state to include the party on its ballots.

One western county — Greene County, near the border with Mississippi — excluded the NDPA candidates anyway, ignoring the Supreme Court’s decision. After another round of complaints by Dr. Cashin, the Supreme Court ordered a special election.

That second time around, NDPA’s six candidates swept the election, giving African Americans the majority in the county’s government and school board for the first time since 1816.

It was “the most significant achievement by black men since the Emancipation Proclamation,” said Ralph David Abernathy, then-president of the Southern Christian Leadership Conference, in a 1969 interview.

In 1970, more than 170 candidates ran on the NDPA ticket for state and local office. Dr. Cashin, a licensed pilot, flew over rural parts of the state to drop his party’s campaign literature.

Following that election, 107 black politicians held office in Alabama — more than any other southern state. And for the first time since Reconstruction, the state legislature included African Americans: Fred Gray, a Democrat, and Thomas Reed, who had run under the banner of Dr. Cashin’s party.

“A black political fire has been lit in this country that shows no signs of going out,” Dr. Cashin told the New York Times in 1971.

His party disbanded in 1976, and over the next several decades, Dr. Cashin struggled with money and had run-ins with the law. He eventually settled in Washington, where he was living when Barack Obama was elected president in 2008.

“Did I help lay the groundwork for this?” he said in an interview with the Alabama Mobile Register. “In so many ways, I was the groundwork.”

John Logan Cashin Jr. was born on April 16, 1928, in Huntsville. His father was a dentist and his mother was a school principal. His grandfather, Herschel Cashin, was a lawyer who served in the Alabama legislature in the 1870s.

Dr. Cashin received a bachelor’s degree from Tennessee State University and a dental degree from Meharry Medical College in Nashville. From 1955 to 1957, he served in the U.S. Army Dental Corps.

He and his father had a private practice together in Huntsville. In 1964, the younger Dr. Cashin ran unsuccessfully for city mayor.

It was “the first time Huntsville had seen any black candidates for public office,” Dr. Cashin told the Huntsville Times in 1996. “We knew we weren’t going to win, but somebody had to break the ice.”

In 1966, the Cashin family moved into a white middle-class neighborhood in Huntsville, becoming the first black family on the block. Dr. Cashin drove a Rolls-Royce and flew his own single-engine plane. He practiced dentistry until the city of Huntsville claimed his office under eminent domain in the mid-1970s.

His self-funded political ambitions soon drained his family’s resources. Dr. Cashin came under scrutiny by the FBI and officials from the Internal Revenue Service said he owed $780,000 in back taxes.

The family “experienced a great reversal of economic fortune,” wrote his daughter, Georgetown University law professor Sheryll Cashin, in her 2008 memoir, “The Agitator’s Daughter.”

Dr. Cashin was convicted of theft in 1982 for depositing his deceased mother’s pension and Social Security checks over a period of several years. The same year, he was convicted of perjury for lying to a judge in an unrelated case. He spent 17 months in a minimum-security federal prison.

His wife of 39 years, Joan Carpenter Cashin, died in 1997. He married the former Louise White in 1998.

Besides his second wife, who lives in Washington, survivors include three children from his first marriage, Sheryll Cashin of Washington, John M. Cashin of Lagos, Nigeria, and Carroll L. Cashin of Huntsville; and five grandchildren.