A Texas judge on Friday night halted part of a new state election law that would criminalize soliciting mail-in ballots, saying it was a violation of free speech. 

Federal District Judge Xavier Rodriguez of San Antonio ruled that Harris County officials had a free speech right to inform voters about mail-in voting.

The judge's decision came just three days before early voting is set to start for the March 1 statewide primary. 

The provision in the controversial SB 1, which took effect in December, was a reaction to a Harris County official who tried to mail out absentee voter applications to all voters in the county, according to the Dallas Morning News. 

TEXAS GOV. ABBOTT TOUTS BORDER SECURITY IN MAJOR AD BLITZ AHEAD OF GOP PRIMARY

Young voters show the "I Voted" stickers after voting at a polling station in Plano, Texas, Nov. 3, 2020.  (Getty Images)

The lawsuit was brought by Isabel Longoria, an elections administrator in Harris County and volunteer deputy registrar Cathy Morgan from Travis and Williamson counties.

Longoria testified in court that the threat of a $10,000 fine or potential jail time made her feel she couldn't speak to voters freely about the right to request a mail-in ballot. 

"I stop mid-sentence sometimes at these town halls and say ‘The law prevents me from saying much more. If you have a question good luck and call us,’" she told the court. 

George P. Bush, Republican candidate for Texas attorney general, speaks during a campaign event in Lakeway, Texas, Feb. 10, 2022.  (Getty Images)

Texas Attorney General Ken Paxton’s office had argued the state could regulate what county officials communicated to voters about absentee ballots but the judge called the argument "unavailing" since the plaintiffs aren’t state employees. 

"The State’s assertion that it is entitled to regulate Longoria and Morgan’s official communications as their employer is wholly unavailing," Rodriguez said. 

Texas Democratic gubernatorial candidate Beto O'Rourke speaks during a campaign rally at Republic Square on Dec. 4, 2021, in Austin, Texas.  (Getty Images)

The rest of the law remains in effect. Separately, the U.S. Department of Justice is suing Texas over the portion of SB 1 that requires identification requirements for mail-in ballots and over access for voters with disabilities. 

Paxton's office did not immediately respond to the order or say if it planned an appeal. 

CLICK HERE TO GET THE FOX NEWS APP

March will be SB 1's first statewide test, according to the newspaper

Texas doesn't have no-excuse absentee voting. Those eligible include voters over 65, the sick and disabled or women expected to give birth within three weeks of Election Day and voters out of the county or in jail during early voting and on Election Day.