The Republican supermajority in the Louisiana State Legislature pushed through a bill this year banning gender-transition care for minors, along with other legislation banning Covid vaccine requirements in schools and any classroom discussion of gender identity and sexual orientation.

It was the kind of aggressive social policy agenda that has gained traction in conservative states across the country. But unlike in most such states, where Republican bills glide into law, lawmakers in Louisiana had to return to the Capitol this week, more than a month after the session ended, to try to claw the legislation back from the brink of failure.

The reason: John Bel Edwards, the lone Democratic governor in the Deep South. He has used vetoes with some success as a bulwark against conservative legislation in a state where Republicans have had a lock on the legislature for more than a decade.

In Louisiana, governors have a history of successfully wielding vetoes; most years, lawmakers have not even bothered trying to override them.

But this year, legislators decided to test that power, reconvening to consider overriding more than two dozen vetoes at a moment when Republicans have tightened their control of the legislature and when Mr. Edwards, who is finishing his second term, is on his way out.

“You voted for this before,” State Representative Raymond J. Crews, a Republican, told his colleagues on Tuesday as he asked them to support overriding the veto of his bill, which would require schools to refer to transgender students by the names and genders on their birth certificates. “I hope you’ll do that again.”

Mr. Crews did not get enough votes. In fact, by the time lawmakers adjourned late Tuesday, all but one of Mr. Edwards’s vetoes still stood. The single exception was the ban on transition care for minors, a bill that the Republicans had channeled most of their energy and resources into resuscitating.

The outcome of the session, which lawmakers raced through on Tuesday, was one last demonstration of how Mr. Edwards, a two-term governor leaving office next year, has succeeded at checking the influence of Republican lawmakers — to an extent.

“It’s kind of hard to be too disappointed — we actually did override the veto on a very important bill,” said State Representative Alan Seabaugh, a Republican who led a faction of some of the most conservative lawmakers.

Still, he acknowledged, Mr. Edwards posed a formidable obstacle. “It really shows what an influence a liberal Democrat governor has over Republican legislators,” Mr. Seabaugh said.

Although many in the governor’s own party would dispute the portrayal of Mr. Edwards — an anti-abortion, pro-gun rights moderate — as a liberal, there was still widespread agreement that his departure in January could bring about a significant shift in the state’s political dynamic.

Many recognize a strong possibility of a Republican succeeding Mr. Edwards, setting the stage for Louisiana to veer even more to the right, after several decades of the governorship flipping back and forth between the two parties.

The state has an all-party “jungle primary” in October. Polls show Jeff Landry, the state’s deeply conservative attorney general, as the front-runner, along with Shawn Wilson, a Democrat and former secretary of transportation and development.

In a state where former President Donald J. Trump won by 20-point margins in 2016 and 2020, Mr. Edwards’s political survival has hinged on the appeal of his biography — he is a West Point graduate and a sheriff’s son — and on his blend of social conservatism and progressive achievements, including expanding Medicaid, that fits Louisiana’s unique political landscape.

He has angered many in his own party with his vehement opposition to abortion rights and his restraint in criticizing Mr. Trump, who as president went to great lengths to campaign against Mr. Edwards’s re-election.

Still, even Democrats who are critical of Mr. Edwards have seen him as a vital barrier against conservative policies that have easily advanced in neighboring states.

“I do think that there’s always room for being a more vocal ally and a more staunch ally to our community,” Quest Riggs, who helped found the Real Name Campaign, an L.G.B.T.Q. advocacy group in New Orleans, said of the governor. “But on the other hand, his vetoes have been a political tool that has been necessary to offset the mobilization by the evangelical right in Louisiana.”

Last year, lawmakers succeeded in overriding a governor’s veto for the first time in three decades, reinstating a Congressional map that Mr. Edwards had objected to because it included only one district with a majority of Black voters despite the fact that one-third of the state’s population is Black. Last month, the U.S. Supreme Court cleared the way for a legal challenge to the map to move forward.

Also last year, Mr. Edwards allowed a bill that excluded female transgender students from school sports to become law without his signature, predicting a veto would be overridden.

Mr. Edwards said this week that he had issued 319 vetoes in his eight years as governor, and that 317 of them had been sustained. “Usually, we have been able to find common ground to move Louisiana forward,” he said.

On Tuesday, lawmakers blitzed through the vetoed bills, including measures that denied parole for dangerous offenders and prevented “foreign adversaries” from owning agriculture land.

Overriding a veto requires a two-thirds majority vote in both houses, and the Republicans have a supermajority by just a thin margin. Two Republican state representatives were absent on Tuesday, and a few in the House and Senate crossed party lines to oppose some overrides, infuriating their more conservative colleagues.

When the ban on gender-transition care came up, lawmakers described conflicting perceptions of what it means to protect children. Supporters of the bill said it would safeguard young people from treatments they claim are dangerous and untested, even though there is broad agreement among major medical associations in the United States that such care can be beneficial for many patients.

Critics of the ban argue that it would imperil a small, vulnerable population of young people by denying them medically necessary care. Most of the 20 other states that have passed similar legislation are facing lawsuits, and judges have already temporarily blocked a few of the bans.

In the House, the vote to override the veto passed 76 to 23, with seven Democrats joining the Republicans. In the Senate, it passed 28 to 11. Republicans seized the sole successful override as a victory.

“We sent a clear signal,” Mr. Landry, the attorney general and candidate for governor, said in a video posted online, “that woke liberal agendas that are destructive to children will not be tolerated in Louisiana.”

Lawmakers and observers contemplated how the political climate would be different during next year’s legislative session, particularly if Republicans were to maintain their supermajority and win the governor’s race.

“What happens when they don’t have to hold back anymore?” said Robert E. Hogan, a political science professor at Louisiana State University, referring to Republican lawmakers if Democrats lose the governor’s race. “You’ll have a governor that’s powerful and on your side.”

That prospect has inspired trepidation among some, especially within the L.G.B.T.Q. community, but has amplified ambitions among conservatives.

Mr. Seabaugh, who is leaving the House because of term limits but is running for a Senate seat, envisions passing some of the same bills next year without the threat of a veto and rolling back Mr. Edwards’s agenda. “I don’t think we can do it all in one year,” Mr. Seabaugh said, “but I’m sure going to try.”