WASHINGTON - After a day that found him at the center of the contentious national debate over new gun laws, Sen. Pat Toomey said a deal on background checks was near.

The Pennsylvania Republican said Tuesday night that he was close to reaching an agreement with Democrats that would give a critical GOP endorsement to the plan.

A deal could represent a breakthrough for new gun legislation that has been stymied until now.

A final agreement, brokered by Toomey and Sen. Joe Manchin (D., W.Va.), was expected to come together Wednesday. The plan, as of Tuesday night, would close background-check loopholes for purchases at gun shows and online, Manchin said, though the full details were not yet known.

Toomey and Manchin "continue to work on final details, but they appear close to a deal," a Toomey spokeswoman wrote late Tuesday in an e-mail.

Manchin told reporters, "We really are getting there."

Over the last week Toomey had become a political pivot point as President Obama and Democrats mounted a furious push for new gun laws in response to the December school shooting that killed 20 children and six teachers in Newtown, Conn.

Much of that push was directed at Toomey. On Tuesday, Mayor Nutter and former Gov. Ed Rendell led a rally outside the senator's Philadelphia office while gun-control advocates ran an ad urging the conservative senator to support a background-check law.

In Washington, Vice President Biden gave a speech imploring lawmakers to back new gun laws, one day after Obama traveled to Connecticut to give his own impassioned address. Relatives of the slain children flew to Washington aboard Air Force One for a final appeal to lawmakers.

After talks with other Republicans broke down, Democrats saw Toomey as their best hope for winning support from a Republican with a strong Second Amendment record who represents a state with a sizable gun culture. Such backing is seen as a critical piece of symbolism in encouraging Republicans and pro-gun Democrats to support any new legislation.

The push to strengthen background checks is the last significant gun-control plan with a reasonable chance of becoming law in the aftermath of Newtown.

Manchin, a gun owner with an A rating from the National Rifle Association, said West Virginia and Pennsylvania were "sister states," with much in common, particularly when it comes to Western Pennsylvania.

"Pat and I have been friends. I know Pat and feel comfortable," Manchin said at the Capitol. "I knew the people he has, and the gun culture he comes from is pretty much like mine."

But the negotiations were delicate, and Toomey, cautious. Most Republicans, including Minority Leader Mitch McConnell of Kentucky, oppose new gun laws, and Toomey risks the wrath of Pennsylvania gun-rights advocates.

Toomey was endorsed by the NRA in 2010, and the group gave him an A. But he has long focused on economic, not cultural, issues, and many in Pennsylvania, particularly in Philadelphia and its suburbs, strongly favor new gun laws.

Mayors Against Illegal Guns, the group led by New York Mayor Michael Bloomberg, launched an ad saying 90 percent of Pennsylvanians support "comprehensive background checks."

"Call Sen. Toomey. Tell him it's time to take Pennsylvania solutions to Washington," the spot urged.

On the sidewalk outside Toomey's Center City office at 16th and JFK Boulevard, close to 100 people gathered Tuesday morning with members of CeaseFirePA. Waving signs and chanting "We want a vote," the crowd cheered Rendell as he spoke.

Rendell praised Toomey, saying the senator had told him he would vote to end any filibuster on the proposed gun legislation so that the issue would move to the full Senate - a key procedural step. The vote to break the filibuster is expected Thursday.

A Toomey spokeswoman declined to comment on Rendell's assertion.

"Sen. Toomey is showing guts," Rendell said.

Shouting in a hoarse voice to be heard above the din, Nutter called gun laws "a family issue" and spoke with emotion about the death of Philadelphia Police Sgt. Stephen Liczbinski, who was shot by a bank robber in 2008.

"He was cut down by an AK-47, his body obliterated by that weapon, when he was trying to do his duty," Nutter said.

A handful of dissenters were sprinkled in the crowd, holding signs with slogans such as "Gun registration = confiscation."

Nutter delivered a fiery rebuke. "That is just a lie," he said. "I don't have time for nonsense and rhetoric, and manufactured scenarios."

In Washington, as the pressure on Toomey mounted, the senator twice declined to speak to reporters, moving at a brisk walk when in public and generally staying out of sight. (Manchin at one point broke into a full run to avoid questions, but later stopped to speak with reporters.)

Toomey has long opposed new gun laws but also has to think about seeking reelection in 2016. A deal on background checks could help his appeal in parts of a state that increasingly leans Democratic in presidential election years. His endorsement might also encourage Republicans from the Philadelphia suburbs to provide critical GOP votes in the House.

But Pennsylvania also has a strong hunting culture, and opponents of new restrictions on firearms are vocal and active.

Many Republicans have said they will oppose more background checks, arguing that existing ones rarely lead to prosecutions.

Each side of the debate has vowed to mobilize.

"Politics is hard," Rendell said in Philadelphia. "It's easy for you and me to say, 'Just do what you believe in.' "

Contact Jonathan Tamari

at jtamari@phillynews.com or follow on Twitter @JonathanTamari. Read his blog, "Capitol Inq," at www.philly.com/CapitolInq.