WASHINGTON – The Democratic-led House backed Wednesday its first major gun-control legislation in years, but Republicans used the debate over it to try to put a focus on illegal immigration.

The House voted 240 to 190 to extend background checks to private transactions at gun shows and over the internet.

But Republicans scored a small victory by amending the bill to require U.S. Immigration and Customs Enforcement be notified if someone fails a background check because he’s in the country illegally.

Democrats called the amendment a red herring to mix up the immigration issue with the gun issue. If the person’s illegal status is in the background check system, they said, the government is already aware of it.

But 26 Democrats crossed party lines to back the change, a sign of their fear of being accused of being lax on illegal immigration.

The vote on what is usually an unsuccessful attempt by the minority party to score a political point on a bill they oppose came as Democrats were celebrating the first significant House vote on gun control legislation since the 1990s.

Eight Republicans voted for the bill and two Democrats opposed it.

The bill passed on the eve of the 25th anniversary of federal background checks going into effect to keep guns out of the hands of criminals and the mentally ill.

"It's about time," said Lori Haas, who became an advocate for tougher laws after her daughter survived two bullet wounds to the head during the shooting massacre on the Virginia Tech campus in 2007.

Haas and advocate Patricia Maisch had been removed from the Senate spectators' gallery in 2013 for yelling “Shame on you!” after senators failed to pass similar legislation.

The House bill is not expected to be considered by the GOP-controlled Senate.

The White House has said President Donald Trump would veto the bill because it would impose “burdensome requirements.”

Still, gun-control advocates believe momentum is on their side. They say voters in the midterm elections replaced House members who had perfect ratings from the National Rifle Association with lawmakers who support expanding gun-control laws. And they argue that trend will continue.

"If we can’t change their minds about how to prevent gun violence, then we’ll change their titles," said Maisch, who helped take down the shooter during the 2011 Tucson, Arizona, shooting that killed six people and injured 13 others, including former Rep. Gabrielle "Gabby" Giffords.

House Republicans, however, held a defiant press conference Tuesday featuring gun-rights advocates and crime victims, including Louisiana Rep. Steve Scalise, the No. 2 House Republican, who said the legislation would not have stopped the gunman who shot him at a congressional baseball game practice in 2017.

Shayne Lopez–Rivas, a 24-year-old from Tallahassee, Florida, shared her story of being raped on a college campus in 2014 by a man with a knife.

“Had I been armed that night,” she said, “I am confident things would’ve been different.”

Opponents say background checks don’t stop criminals from getting guns but do make it harder for law-abiding citizens to defend themselves.

Advocates say the law needs to be updated because too many transactions have been exempted from federal background check requirements that went into effect in 1994.

“The intent of the Brady Law was to ensure that a background check be conducted before every gun sale,” said Kris Brown, president of the Brady Campaign to Prevent Gun Violence.

Polls show extending background checks to include gun shows and the internet has wide support, even among Republicans and gun owners.

But supporters say it was the legions of activists across the country who made the issue a priority, including in last year’s elections, that prompted the House action.

"We can do all the inside maneuvering that we want," said House Speaker Nancy Pelosi, D-Calif. "But without the outside mobilization, we cannot enjoy the success of saving lives and making progress."

In what the nonpartisan Center for Responsive Politics dubbed one of the biggest surprises of the midterm elections, gun control groups outspent pro-gun groups.

“My predecessor in this office wasn’t willing to do anything about the gun violence crisis," said Colorado Rep. Jason Crow, one of the freshman Democrats whose promise of gun control helped him flip a Republican seat in November.

Crow's district was affected by two major mass shootings, the 1999 Columbine High School massacre and the 2012 Aurora Theater shooting.

California Rep. Mike Thompson, chair of the Gun Violence Prevention Task Force, said the House will hold hearings on what other actions lawmakers can take.

Steps that groups like the Brady Campaign are looking for include significantly funding gun violence prevention research, encouraging people to make sure guns in their homes are secure, and examining gunmakers’ liability protections.

“We appreciate this start,” said Brown, the Brady Campaign president. “But it’s just the beginning.”

And with each mass shooting, the number of activists grows.

Shaundelle Brooks never thought she'd be fighting for gun control, but after her son Akilah Dasilva was one of four people killed at a shooting at a Tennessee Waffle House in 2018, Brooks became an advocate.

Dasilva, a rap artist and music video producer, had spoken against gun violence. Now his mother has taken up the cause.

"The way that he died, it’s like how can you not?” she said. "I don’t want anyone else to feel that."