(The Hill) – The House passed a bill mostly along party lines on Wednesday that seeks to create domestic terrorism offices throughout the U.S. government, just days after a gunman fatally shot 10 people in Buffalo, N.Y., in an incident that President Biden called “domestic terrorism.”

The bill, dubbed the Domestic Terrorism Prevention Act, passed in a 222-203 vote, with one Republican bucking party leadership and voting for the legislation.

The legislation specifically calls for the formation of domestic terrorism offices within the Department of Homeland Security (DHS), Department of Justice (DOJ) and FBI that would be tasked with monitoring and scrutinizing potential terror activity.

A vote on the bill was scheduled after Rep. Brad Schneider (D-Ill.), the sponsor of the legislation, called on Speaker Nancy Pelosi (D-Calif.) to bring the legislation to the floor. He pointed to the Saturday shooting at a grocery store in Buffalo, where 13 people were shot, 11 of whom were Black.

The suspected shooter — identified as 18-year-old Payton Gendron of Conklin, N.Y. — reportedly embraced ideas that are connected to the “great replacement” theory, a racist, far-right conspiracy that liberal elites are encouraging immigration to replace white voters.

Some Democrats referenced the fatal shooting during debate on the bill prior to its passage.

“Here we are again, reeling from another horrific domestic terrorist attack. This week, a racially motivated shooting in Buffalo, N.Y., perpetrated by an avowed white supremacist,” Rep. Veronica (D-Texas) said on the House floor.

Rep. Chip Roy (R-Texas) on the House floor said the bill was about “empowerment of the federal bureaucracy to target Americans.”

“This is nothing more than empowering the federal government to police thought and speech in the United States of America, and we should oppose it roundly,” he later added.

The legislation was initially slated to be passed through a fast-track process late last month, but Democratic leaders pulled it from the calendar after some progressive lawmakers voiced opposition to the bill.

Schneider told reporters on Monday that the legislation was adjusted to specify that none of its tenets would undermine First Amendment rights. It previously passed in a voice vote in 2020.

The bill calls for establishing a Domestic Terrorism Unit in the Office of Intelligence and Analysis at DHS, which would be tasked with observing and examining domestic terrorism activity, in addition to a Domestic Terrorism Office in the Counterterrorism Section of the National Security Division of the DOJ, which would look into and prosecute domestic terrorism incidents and communicate with the Civil Right Division about occurrences that may be considered hate crimes.

The bill also encourages the establishment of a Domestic Terrorism Section of the FBI’s Counterterrorism Division, which would probe activity tied to domestic terrorism.