Crooked politicians, take heart: You may yet have a chance at a second act in elected office.

Derrick Shepherd, the former Louisiana state legislator who served two years in prison on public corruption charges, on Wednesday won his challenge to the constitutional provision that disqualified him from running for the District 87 seat in the state House last year.

The Louisiana Supreme Court ruled that the provision barring convicted felons from running for state and local office for 15 years after the end of their sentence was unconstitutional because the amendment approved by voters two decades ago didn’t exactly match the language approved by the Legislature.

“Man, I’m on cloud nine,” Shepherd said Wednesday afternoon. “I feel vindicated. So many people really didn’t believe my cause, but I believed it was right and it was true, and to have the state Supreme Court validate the argument is superb.”

While the ruling clears the way for convicted felons to seek office, the decision suggested that a properly written law with the same purpose would pass constitutional muster.

Shepherd waged a legal battle on two fronts last fall to stay on the Oct. 24 ballot for the Harvey-based seat ultimately won by Rodney Alexander. He said at the time he would campaign as a champion for second chances, but he was unable to get a ruling in time to keep him on the ballot.

“Maybe now I have a chance to get a second chance,” he said.

At issue was the fact that the amendment approved by voters did not include a clause inserted by the Legislature exempting felons who served only probation, not jail time, from the ban on seeking office. That clause in fact didn’t apply to Shepherd, who served two years in federal prison after pleading guilty in 2008 to accepting $140,000 from the sale of fake bonds, but he maintained that the whole amendment was nevertheless unconstitutional.

On Wednesday, his contention was validated.

“In reaching this conclusion,” the court wrote, “we are mindful that ours is a system of law, not men, and our fidelity must be to the mandatory requirements of the constitution without regard to the parties, or to the wisdom and policy of the amendment at issue. ... To ignore these restraints and procedures would be to open the constitution to alteration without the protections enshrined in the constitution. This we cannot do. We are thus duty-bound by the constitution to affirm the district court’s judgment holding the amendment was not properly enacted.”

One justice dissented.

Shepherd said he is considering a run for David Vitter’s seat in the U.S. Senate — something he could have done even without Wednesday’s ruling because it is a federal office — but that he now has a broader array of options.

“I’ll be looking at everything now that I have all options available,” he said.

Robert Garrity, who represented Shepherd in his challenge to the provision, applauded the verdict.

“I think that the Supreme Court looked at the obvious defects in the procedure ... and came to the only conclusion they could possibly come to — that the Legislature botched the job.”

Garrity said the victory was important even if it came too late to help Shepherd last year.

“It’s disappointing that it was a hollow victory from that perspective, but ... he may be able to run for another election in the immediate future.”