(CNN) Texas will be allowed to enforce its voter ID law in the upcoming elections, a federal appeals court has ruled.

In the 2-1 decision, a panel of the 5th US Circuit Court of Appeals in New Orleans overturned a lower court ruling that had blocked the law last year after concluding the state acted with intent to discriminate against minorities.

Friday's ruling is a major victory for Texas officials who have defended state-level voter ID laws against legal challenge for years.

Senate Bill 14, which passed in 2011 and went into effect in 2013, required voters to present government-issued photo IDs, such as a state driver's license, a Texas election identification certificate, a US passport or a military identification card.

Supporters said requiring photo IDs before casting a vote would prevent voter fraud. Critics argued the law disenfranchised poor and minority voters, who face difficulties obtaining IDs.

A federal court blocked SB 14 during the 2016 election, and lawmakers put in place a second measure -- Senate Bill 5 -- that allowed voters who had no photo ID to vote by signing a declaration.

Then, last year, the revised law was blocked by a lower court.

At the time, Judge Nelva Gonzales Ramos with the US District Court for the Southern District of Texas said the law discriminated against many black and Latino people.

She said the law "had a discriminatory impact" and that there had been a "pattern of conduct unexplainable on grounds other than (the) race factor."

Gonzales Ramos later granted a permanent injunction against the law. She said the second law was an improvement but fell "far short of mitigating the discriminatory provisions of SB 14."

In Friday's ruling, the appeals court panel said the Texas Legislature intended to "cure all the flaws" of the original law by passing SB 5 and had "succeeded in its goal."

The judges reversed the previous ruling because the lower court had "abused its discretion," they wrote in the ruling.

"The court erred first in concluding that SB 5 must be invalidated as the tainted fruit of SB 14," the ruling states.

Ruling criticized and cheered

Those who challenged the law called Friday's ruling disappointing.

"We are exploring all legal options," Danielle Lang, senior legal counsel for the Campaign Legal Center, which represents plaintiffs, said in a statement. "We will also work with our partners to ensure that voters are well-educated about their options and not deterred from exercising their right to vote by any confusion around the photo ID."

"We must not lose sight of how far we have come in the fight for Texas voters," she said. "Because of our brave clients and this litigation, voters statewide can never be turned away from the polls simply for lacking a certain type of photo ID."

Kristen Clarke, president and executive director of the Lawyers' Committee for Civil Rights Under Law, also part of the plaintiffs' legal team, said her organization was weighing its next step.

"No law should be allowed to remain in force that is merely built on the back of a discriminatory law," she said in a statement.

The Department of Justice issued a statement applauding the appellate panel's decision.

"The Justice Department is committed to free and fair elections, and their protection is essential to our democracy. The Justice Department joined the State of Texas in arguing that SB 5 met all of the Fifth Circuit's mandates when it was passed by the legislature, and we are pleased that the court agreed today," spokesman Devin O'Malley said.

Texas Attorney General Ken Paxton praised the decision, saying the revised law "removes any burden on voters who cannot obtain a photo ID."

"The court rightly recognized that when the Legislature passed Senate Bill 5 last session, it complied with every change the 5th Circuit ordered to the original voter ID law," Paxton said in a statement . "Safeguarding the integrity of our elections is essential to preserving our democracy."

Plaintiffs can appeal to the full 5th Circuit or to the Supreme Court.

Other states, other disputes

Voter ID laws have stirred controversy elsewhere.

In 2016, the US Supreme Court upheld a ruling that blocked key provisions of North Carolina's voter ID law.

By deadlocking 4-4, the court left in place the ruling by a three-judge panel of the 4th Circuit Court of Appeals that held provisions of the law targeted "African-Americans with almost surgical precision."

The law that was struck down had required a photo ID to vote, imposed restrictions on early voting days and eliminated same-day registration. Republican leaders in the North Carolina legislature complained the ruling was politically motivated.

Wisconsin's voter ID law has been in and out of court for several years.

A federal judge criticized the state government in 2016 for not doing enough to inform the public that "credentials valid for voting" would be issued to those who visit the DMV and initiate the ID petition process. But the judge did not strike down the voter ID law.