Two senators from gun-friendly states struck a compromise on background checks for gun buyers, boosting the outlook for gun control legislation that's expected to hit the Senate floor Thursday.

The bipartisan deal was negotiated by Sens. Joe Manchin, D-W.Va., and Patrick Toomey, R-Pa., and announced Wednesday. The two said the compromise would prevent criminals and the mentally ill from buying guns while exempting private transactions between family members.

"Americans on both sides of the debate can and must find common ground," Manchin said in announcing the agreement alongside Toomey. "That's what Pat and I have been working on and what we've been able to do. Today's agreement is a first step in a common ground that all of us agree is crucial, to keep guns out of dangerous hands and to keep our children safe."

President Obama, who has been campaigning heavily for stricter gun laws, said the deal "does represent welcome and significant bipartisan progress."

The Senate is scheduled to vote Thursday on whether to bring to the floor stricter legislation that would require universal background checks for all gun purchases. Supporters would need 60 votes to stop a filibuster that Republicans are threatening to launch to block consideration of a gun measure they say infringes on the Second Amendment. Lawmakers said there are enough Democrats and Republicans supporting the measure to break the filibuster.

Republican opponents of the bill -- including Sens. Ted Cruz of Texas and Mike Lee of Utah -- charge that expanding background checks could lead to the creation of a national gun registry while preventing lawful owners from giving guns to friends and family.

The Manchin-Toomey compromise calls for expanding background checks to sales at gun shows and over the Internet but excludes personal transfers. It would also prohibit the creation of a federal gun registry and expand certain gun rights, such as allowing service members to buy guns in their home states, not just where they're stationed.

Toomey, who along with Manchin enjoys an "A" rating from the National Rifle Association, said it seemed "inevitable" that gun legislation would come to the Senate floor for debate and said background checks can be "helpful" at preventing the wrong people from acquiring guns and "does not infringe on the Second Amendment rights of law-abiding citizens."

The NRA issued a statement objecting to the plan, saying President Obama should focus on mental health issues and gang violence rather than limiting gun ownership.

"Expanding background checks at gun shows will not prevent the next shooting, will not solve violent crime and will not keep our kids safe in schools," an NRA statement read.

In addition to the Manchin-Toomey provision, other amendments to the bill will also be debated, including a measure to ban many assault-style weapons and another limiting the number of rounds allowed in magazine clips, but they are not expected to pass.

Sen. Chris Murphy, D-Conn., made the case on the Senate floor Wednesday for limiting clip size, saying the shooter at Sandy Hook Elementary School in Newtown, Conn., was able to kill more children because his gun could fire 30 rounds at a time.

"There are an awful lot of parents in Newtown who believe their sons and daughters might be alive today if we had a law restricting it to 10 rounds," Murphy said.