The Texas Republican who cast the only vote from the party in favor of the George Floyd Justice in Policing Act said in a now-deleted tweet that he "accidentally pressed the wrong button," a report said.

The House voted along party lines Wednesday to pass the measure, a Democrat-backed bill that seeks to enact sweeping police reform following Floyd’s death during an encounter with police in Minneapolis last May.

Rep. Lance Gooden took to Twitter shortly after the vote to mention the mistake and to alert followers that he "changed the official record to reflect my opposition to the partisan George Floyd Policing Act."

HOUSE PASSES BILL ON SWEEPING ELECTION REFORM

The Hill was the first to report on the tweet.

REPUBLICAN STUDY COMMITTEE HITS BACK AT DEMOCRATS' HR 1 ELECTION BILL

"I have arguably the most conservative/America First voting record in Congress!" he tweeted later. "Of course I wouldn’t support the radical left’s, Anti-Police Act. I have changed the official record to reflect my opposition!"

The wide-ranging bill would overhaul standards for police tactics and conduct at the federal level. Prominent measures include a federal ban on no-knock warrants and chokeholds, limits on qualified immunity shielding police from civil lawsuits, a framework to prevent racial profiling and the establishment of a national registry on allegations of police misconduct.

CLICK HERE TO GET THE FOX NEWS APP

GOP critics, including Senate Minority Leader Mitch McConnell and Sen. Tim Scott of South Carolina, have argued removing the liability shield would undermine public safety and make it difficult to recruit.

Fox News' Thomas Barrabi contributed to this report