A federal judge on Friday granted a preliminary injunction barring Texas Attorney General Ken Paxton from continuing a lawsuit against the Democratic fundraising platform ActBlue, ruling the suit was a retaliatory attack linked to Paxton’s Senate campaign.

In a 15-page ruling, U.S. District Judge Richard Stearns, sitting in Boston, found that ActBlue was likely to prevail on its claim that Paxton’s lawsuit violated the platform’s free-speech rights under the First Amendment. ActBlue filed its own lawsuit in Massachusetts, where it is based, to stop the Texas attorney general’s action.

“The lawsuit in Texas is undoubtedly an adverse action,” Stearns wrote. “And having previously found bad faith, the court agrees with ActBlue that the evidence in the record compels the conclusion that, far from protecting Texas consumers, the action was filed in retaliation for ActBlue’s fundraising on behalf of Talarico, Paxton’s current political rival for the Senate seat.”

Talarico won the Democratic nomination for the U.S. Senate seat currently held by Paxton’s Republican primary challenger, Sen. John Cornyn. Paxton defeated Cornyn in a May runoff after receiving an endorsement from President Donald Trump. The general election is in November.

Paxton began investigating ActBlue in 2023, alleging the platform enabled illegal foreign contributions through gift cards and prepaid debit cards. Trump requested the investigation before his re-election, according to the ruling. Paxton filed his lawsuit against ActBlue in Texas in April.

Stearns noted that Paxton’s suit came shortly after ActBlue reported a $2 million fundraising day for Talarico, and that the timing and Paxton’s own public statements revealed the litigation’s true purpose.

“The truth is plain and captured in Paxton’s own declarations: The lawsuit was filed in retaliation for (and in an attempt to suppress) ActBlue’s efforts to fund [James] Talarico’s campaign,” Stearns ruled.

“Paxton’s public statements in the wake of filing the case against ActBlue reveal his true motivation,” the judge added. “While a prosecutor is entitled to a large degree of prosecutorial discretion and has a right to make a considered public accounting of his actions, Paxton did not hesitate in drawing a connection between the lawsuit and his candidacy for Senate.”

Paxton had alleged that ActBlue misrepresented itself to donors. Stearns rejected that framing.

“The platform does nothing more than facilitate political donations from private donors, who seek out its convenience, anonymity and aggregation of the benefit bestowed on chosen political candidates,” the judge ruled.