Texas' voter ID law that was twice blocked over findings of discrimination can stay in effect for the 2018 elections, a U.S. appeals court ruled Friday.

It was the second major ruling over voting rights in the U.S. this week after an Arkansas judge on Thursday blocked that state's voter ID measure as unconstitutional.

But in a 2-1 decision by the 5th U.S. Circuit Court of Appeals in New Orleans, the Texas law that critics have slammed as one of the toughest voter ID measures in the nation was seen as a suitable replacement for the original 2011 law that a federal judge had likened to a "poll tax" on minority voters.

The biggest change to the Texas law — which accepts handgun licenses as sufficient identification to vote, but not college student IDs — is that voters without any acceptable photo ID can still cast a ballot so long as they sign an affidavit. Opponents and a federal judge in Texas balked at the revisions, saying criminal penalties tied to lying on the affidavit could have a chilling effect on voters.

The biggest change to the Texas law ... is that voters without any acceptable photo ID can still cast a ballot so long as they sign an affidavit.

U.S. Circuit Jones Edith Jones said the lower court went too far.

"The district court relied too heavily on evidence of Texas's state-sponsored discrimination from a bygone era," Jones wrote in her majority opinion.

The revisions to Texas' law were also supported by the U.S. Justice Department — a move that amounted to a complete reversal for the federal government, which under former President Barack Obama had joined minority rights groups in suing over the law. But two months after Donald Trump took office, the Justice Department abandoned the argument that Texas passed voter ID rules with discrimination in mind and said the changes should satisfy the courts.

Opponents bristled at the ruling but didn't immediately indicate their next step.

"We continue to firmly believe that the Texas photo ID law is one of the most discriminatory and restrictive measures of its kind," said Kristen Clarke, president of the Washington-based Lawyers' Committee for Civil Rights Under Law, one of the groups involved in the lawsuit.

Texas first passed the voter ID law in 2011, the same year the GOP-controlled Legislature adopted voting maps that were also struck down as discriminatory. Republican Attorney General Ken Paxton said Friday's ruling "removes any burden on voters who cannot obtain a photo ID."

The law was twice shot down by U.S. District Judge Nelva Gonzales Ramos — an appointee of then-President George W. Bush — who ruled that the strict requirements disadvantaged minorities and effectively dampened the electoral power of Texas' surging Hispanic population. She also disapproved of the modified version, which makes knowingly lying on the affidavit to vote a misdemeanor.

Democrats said that provision could keep people home on Election Day over fears of incorrectly filling out a form. Republicans call those concerns unfounded but have also supported aggressive action against voter fraud, which is rare. Earlier this year, a Texas woman was sentenced to five years in prison for voting in the 2016 presidential election when she was ineligible because she was on probation.

Thirty-four states have laws requiring or requesting that voters show some form of identification at the polls, according to the National Conference of State Legislatures. Arkansas' newly blocked law would have required officials to provide photo identification to voters free of charge if they didn't have any other photo ID. It also would have let voters without ID to cast provisional ballots by signing affidavits.

Pulaski County Circuit Judge Alice Gray, however, ruled there was no guarantee those provisional ballots would be counted and that they would face greater scrutiny.