A bill to require nearly all gun buyers to undergo background checks narrowly passed a Senate committee Tuesday in a party-line vote.

The Senate Judiciary Committee voted 10-8 to approve Democratic Sen. Chuck Schumer's bill, which would close loopholes that allow some people to buy guns from private sellers without undergoing a criminal background check. No Republican supported the measure.

The bill, Schumer said after the vote, is the "sweet spot" of gun legislation that actually has a chance of attracting enough bipartisan support to pass.

Sen. Chuck Grassley, the top ranking Republican on the committee, said he opposed the bill in part because he believes it would set up a national gun registry, which is prohibited under federal law. The bill would require licensed dealers to keep records of weapon transfers, and would allow people to transfer weapons without background checks only to immediate family members and in certain sporting or training events. "Criminals will continue to steal guns and buy them illegally to circumvent the requirements," Grassley said in a statement.

Lawmakers on the panel delayed a vote on another proposed bill that would ban certain kinds of semi-automatic weapons. Earlier, the committee approved a bill to toughen criminal sentences for gun traffickers.

According to the Associated Press, Schumer had engaged in a weekslong campaign to win over Sen. Tom Coburn, R-Okla.,to support the background check bill. Coburn ultimately voted against the bill, but Schumer still hopes to attract Republican support before the Senate votes on the measure sometime next month.

The National Rifle Association is opposing any expansion of background checks. An NRA spokesman said the lack of bipartisan support for the bill suggested it could not pass.