WASHINGTON — Gun control efforts in Congress cleared a significant hurdle Wednesday as the Senate prepared to open what could be a weeks-long debate, even as opponents plotted a shift in strategy aimed at undermining a comprehensive package of legislation.

Gaining enough support simply to open the debate has required extensive negotiation and legislative maneuvering, testimony to the difficult politics of gun control. If the Senate proceeds as scheduled Thursday, it will mark only the third time in a generation that a significant gun measure has come to the floor.

The last time — late in the Clinton administration — the bill eventually fell victim to attacks from both sides. After passing the Senate with a tie-breaking vote by then-Vice President Al Gore, it failed in the House, where amendments left it too weak in the eyes of gun control advocates, but still too tough for gun rights supporters to accept.

Gun rights advocates plan a similar strategy this time. Their goal, according to Senate officials, is to try to draw out the debate on amendments and offer a number of measures that would expand gun owners' rights. Democrats running for reelection next year in conservative states will feel the need to back many of those amendments, opponents of the measure hope, and if enough of them pass, liberal gun control advocates will turn against the bill.

Ever since Congress began work on a legislative response to last year's slaying of 20 children and six educators in Newtown, Conn., backers of new gun laws have tried to come up with a package that would avoid that fate. Their goal is to win support from enough gun control skeptics to get to 60 votes in the Senate — the level required to avert a filibuster — without losing the backing of more ardent gun control advocates.

That effort seemed stalled until last week, when Sen. Joe Manchin III of West Virginia, a Democrat with an A rating from the National Rifle Assn., began negotiating with Republican Sen. Patrick J. Toomey of Pennsylvania over expanded background checks for gun sales.

On Wednesday, the two unveiled a compromise that appeared to include much of what Democratic backers of gun control had been seeking, albeit with some concessions. The proposal won praise from key gun control advocates and opposition from the NRA.

The compromise would require background checks for a large majority of gun purchases, closing the current exemption for gun shows and Internet sales. Certain private transactions, including transfers between family members and neighbors, would be exempt.

All sales subject to the expanded checks would also be subject to current record-keeping requirements, a key demand of gun control advocates and more liberal Democrats, including Sen. Charles E. Schumer of New York, lead author of the Senate's gun control package. To assuage the fears of gun rights advocates, the bill would restate existing law that prohibits the creation of a national registry of gun owners.

The compromise also gives gun rights advocates some victories. Notably, gun owners would be given the right to transport their weapons through states where their firearms are illegal. For example, gun owners who legally own an assault weapon would have the right to transport it through California or New York, which ban such weapons, so long as they could show they were traveling through, not remaining in, the state.

Schumer spent the morning calling leading gun control advocates to seek their support for the compromise, and won significant backing. New York Mayor Michael R. Bloomberg, who has spent heavily from his personal fortune to back gun control, said in a statement on behalf of his group, Mayors Against Illegal Guns, that the bill "will not only help keep guns out of the wrong hands — it will help save lives and keep our communities safe."

President Obama said that there were "aspects of the agreement that [he] might prefer to be stronger," but that the agreement "does represent welcome and significant bipartisan progress."

Manchin, who won his Senate seat after a campaign in which he aired a television ad that showed him firing a gun at an Obama-sponsored bill, said he believed the proposal would win support from gun owners.

"They understand this is common sense — this is gun sense. We're not infringing on their rights as an individual citizen," he said. "If you're going to go to a gun show, you should be subjected the same as if you went to the gun store. If you're going to go online, you should be the same as if you bought the gun across the state lines.... This makes sense."