John Patterson, an intractable segregationist Democrat of the 1950s and 1960s who served as Alabama’s attorney general and then governor and belatedly said he came to regret the stances that helped him rise to power in a tumultuous era, died June 4 at his home in Goldville, Ala. He was 99.

The death was confirmed by his son, Albert Patterson. He did not cite a specific cause.

Mr. Patterson’s political career — as attorney general from 1955 to 1959, followed by four years as the state’s governor — encompassed two milestones of the civil rights revolution, the Montgomery bus boycott of 1955 to 1956 and the Freedom Riders challenge in 1961. Time magazine featured him on its cover in 1961 as the embodiment of Southern defiance.

Political scientists in Alabama noted that Mr. Patterson’s tenure as governor was more far-reaching than its racial legacy. Anne Permaloff, a retired political science professor at Auburn University, pointed to his efforts to achieve many reforms aimed at helping the poorest citizens. Her Auburn colleague Wayne Flynt called Mr. Patterson “the kind of contradictory figure that was so often found in Alabama politics.”

In his first year as governor, Mr. Patterson advanced an ambitious agenda that included putting schools on a sound financial footing for the first time ever, cracking down on loan sharks and other consumer predators, and doubling pensions for the state’s neediest elderly — moves that drew opposition from conservative legislators who resisted social legislation in most forms.

He also was among the first governors to take advantage of a federal program — later to become Medicaid — to provide health services to the poor.

Like many Southern politicians of his generation, Mr. Patterson came to regret his early positions on race. Exactly 50 years after his election as governor, he announced he would vote for then-Sen. Barack Obama (D-Ill.), who became the nation’s first Black president.

“Having a record of supporting segregation,” Mr. Patterson said in an interview for this obituary, “is a terrible burden to bear.”

John Malcolm Patterson was born in Goldville on Sept. 27, 1921. His father, Albert Patterson, trained as a lawyer but, unable to establish a decent practice, supported his family as a teacher in rural schools.

In 1933, the Pattersons moved to Phenix City, Ala., where brothels, gin joints and gambling houses attracted soldiers stationed at the nearby Army base of Fort Benning, Ga. Albert Patterson found success as a lawyer in Phenix City, often representing the bosses of the illicit enterprises that permeated the town.

During Army service in World War II, John Patterson was assigned to Gen. Dwight D. Eisenhower’s staff in London. He followed Eisenhower into the North Africa campaign, where he received the Bronze Star Medal for combat service.

He received a law degree from the University of Alabama in 1949 and was recalled to Army service during the Korean War before resuming his legal career with his father’s practice in Phenix City.

In June 1954, Albert Patterson ran for state attorney general and stunned Phenix City crime bosses by winning the Democratic nomination — then tantamount to election — by campaigning to rid his town of crime. Less than two weeks after his victory, he was assassinated on a downtown street. Phenix City was placed under martial law, and a deputy sheriff was eventually convicted of the murder.

John Patterson took his father’s place as the nominee, and, at age 32, became attorney general. During Mr. Patterson’s first year in office, Rosa Parks refused to surrender her seat to a White passenger on a Montgomery bus, an act of protest that brought about her arrest and a year-long bus boycott led by the Rev. Martin Luther King Jr.

As the boycott continued, White resistance hardened, and Mr. Patterson — who had so far not taken firm positions on civil rights — made what he would later acknowledge was a calculated, even cynical, decision: If he wanted to be elected governor, he would have to move to the forefront in the fight to maintain segregation.

Most observers gave him little chance to prevail over George C. Wallace, a state judge who was running as a relative moderate on race issues. But Mr. Patterson’s persistent attacks on the NAACP won him backing from the Ku Klux Klan. His campaign was further energized by his populism, which included his slogan “Nobody but the people for Patterson.”

Others were rallied by memories of “The Phenix City Story” (1955), a critically acclaimed if factually problematic film that dramatized the killing of Albert Patterson and showed John Patterson (played by Richard Kiley) carrying his father’s reformist torch.

Mr. Patterson’s victory had an enduring effect on Wallace. Shaken by his loss, he recast himself as an ardent foe of desegregation, and his race-baiting rhetoric came to define his later tenure as governor and his presidential runs.

As governor, Mr. Patterson made a risky but pragmatic decision to endorse a Northern Catholic — Sen. John F. Kennedy of Massachusetts — for president early in the 1960 Democratic primary season. He later said he felt a genuine rapport for Kennedy, but he also foresaw the need for allies in the simmering civil rights struggle.

Mr. Patterson was one of four Alabama public officials who sued the New York Times in 1960 for libel over an advertisement that was highly critical of police and state authorities’ handling of civil rights demonstrations. An Alabama jury awarded Mr. Patterson $1 million. But in a unanimous 1964 decision, the U.S. Supreme Court overturned the verdicts in what is considered a landmark in press freedom. Public figures, the court said, had to prove “actual malice,” meaning “that the statement was made with knowledge of its falsity or with reckless disregard of whether it was true or false.”

Early in 1961, the Freedom Riders — civil rights activists who were testing the Supreme Court’s recent ruling outlawing segregation in interstate travel — encountered violence almost from the moment they entered Alabama. Many of the riders were severely beaten with baseball bats and lead pipes when they stepped off the buses and found no local police there to protect them from White mobs.

“We can’t act as nursemaids to agitators,” an enraged Mr. Patterson said at a news conference at the time. “You just can’t guarantee the safety of a fool, and that’s what these folks are.”

A furious round of calls ensued between Mr. Patterson and the Kennedy administration, and the governor reluctantly agreed to ensure the safety of the Freedom Riders between Birmingham and Montgomery, where city police would take over.

But the police were slow to arrive at the bus terminal, allowing local segregationists to attack savagely again. Attorney General Robert Kennedy, the president’s brother, mobilized hundreds of federal marshals, and Mr. Patterson declared martial law as a last resort.

Mr. Patterson, a self-professed gradualist on race matters, later told Robert Kennedy biographer Larry Tye that he knew that history was not on the side of segregationists, but he didn’t want the Democratic Party to lose its grip on the South.

“When [Kennedy] was dealing with me . . . he wasn’t dealing with an Orval Faubus,” Mr. Patterson said, referring to the Arkansas governor who provoked a major civil rights crisis in Little Rock in 1957. “He could have dealt with me reasonably.”

Prevented by state law from a second consecutive term, Mr. Patterson was succeeded by Wallace in 1962. Four years later, when Mr. Patterson mounted a comeback, the political landscape had changed. Despite Wallace’s promise to maintain “segregation forever,” the schools by then had begun to be integrated, and the Voting Rights Act of 1965 had enrolled large numbers of Black voters in Alabama for the first time in a century.

Even so, Wallace’s intransigence had made him an immensely popular figure among White voters. He chose to run his wife, Lurleen, as a stand-in, and she crushed a large field of challengers, including Mr. Patterson.

After losing a 1970 race for chief justice of Alabama, Mr. Patterson resigned himself to a workaday law practice. In 1984, his erstwhile rival George Wallace, who was again governor, named him to the Alabama Court of Criminal Appeals. Mr. Patterson remained on the court until his retirement in 1997.

His marriages to Gladys Broadwater and Mary Jo McGowin ended in divorce. In 1975, he married his longtime companion, Florentina “Tina” Brachert Sawyers. Besides his wife, survivors include two children from his second marriage, Albert L. Patterson III and Barbara Patterson Scholl;; and five grandchildren.

Long having disavowed his public stances on segregation, Mr. Patterson announced his support of Obama in 2008. “Of course, there’s some anti-racial feeling still out there and we have to cope with that, you know, but it’s waning very rapidly,” he told the Birmingham News. “Of course if [Obama] is successful, and God I hope he is, it will put an end to that for good; it sure will.”

Ray Jenkins, a freelance reporter, died in 2019.