Eight House Republicans voted with Democrats on Wednesday to support legislation that would require universal background checks for gun sales, despite opposition from the gun lobby.

Nearly all the Republicans who broke with their party are centrists, including several who represent competitive swing districts.

The number of GOP defectors was only slightly higher than the five Republicans who had signed on as co-sponsors to the legislation.

“Our laws cannot be effective if there are gaping loopholes that allow criminals and deranged individuals to purchase firearms at gun shows or over the Internet without being subject to background checks. Today I voted for HR 8 to close these loopholes - a proposal supported by over 90 percent of gun owners in America, according to respected polling organizations," Buchanan said in a statement, according to a local ABC affiliate

The legislation would require universal background checks for gun sales, including at gun shows and in private online transactions. Current law only requires licensed firearms dealers to conduct background checks before making a sale.

But it does carve out exemptions for certain circumstances, including transfers between family members, use in hunting, and when "necessary to prevent imminent death or great bodily harm," such as domestic violence.

Democrats also plan to target King, Mast and Upton in 2020, while Smith, Buchanan and Diaz-Balart are considered to represent safe GOP seats.

Mast won reelection last November by 9 points. He has gone beyond supporting an expansion of the background check to a more stringent gun control measure: an assault weapons ban.

Mast, an Army veteran who lost both his legs while serving in Afghanistan, wrote in a New York Times op-ed after last year's shooting at a high school in Parkland, Fla., "I cannot support the primary weapon I used to defend our people being used to kill children I swore to defend."