WASHINGTON -- Led by the senators who represent Newtown, Connecticut -- where a gunman fatally shot 26 people, including 20 children, in 2012 -- Democrats took control of the Senate floor Wednesday and vowed to keep talking until lawmakers start doing something about gun violence.

Their stand lasted for nearly 15 hours, before they declared victory, saying shortly before ending their filibuster at 2:11 a.m. Thursday that Senate leaders had agreed to votes on two measures to close gun-buying loopholes.

One is an amendment that would bar people who are on terrorist watchlists from buying guns. Another would crack down on online and private gun sales that evade background checks.

“It is our understanding that the Republican leader and the Democratic leader have spoken and that we have been given a commitment on a path forward to get votes on the floor of the Senate," said Sen. Chris Murphy (D-Conn.), who spearheaded the filibuster-style takeover.

Murphy took control of the floor just after 11:20 a.m. Wednesday, declaring that after Congress had done nothing to curb mass shootings in the four years since a gunman in his state opened fire on students and teachers at Sandy Hook Elementary School, it was time to force action.

"Newtown is still putting itself back together, probably will be for a long time," Murphy said.

He stated it was finally time for the Senate to do something about gun violence beyond the usual ineffective debates, and that lawmakers could not go about business as usual after a mass killing at a gay club in Orlando, Florida, on Sunday claimed 49 victims.

"This is a different moment today than it was at the end of last week," Murphy said. "There is a newfound imperative for this body to find a way to come together and take action, to try to do our part to stem this epidemic of gun violence and in particular this epidemic of mass shootings."

"There is a fundamental disconnect with the American people when these

tragedies continue to occur and we just move forward with business as usual," Murphy continued. "So I'm going to remain on this floor until we get some signal, some sign that we can come together on these two measures, that we can get a path forward on addressing this epidemic in a meaningful bipartisan way."

Murphy interrupted consideration of the Commerce, Justice and Science Appropriations Act. Among other things, it funds the Justice Department, and Democrats had already planned to try to add amendments related to gun violence to it. The first was expected to be Sen. Dianne Feinstein's measure to bar people who are on the terrorism watchlist from buying guns.

Murphy sought a vote on the so-called gun-show loophole, which can allow criminals to buy guns from unlicensed dealers without a background check.

I am prepared to stand on the Senate floor and talk about the need to prevent gun violence for as long as I can. I've had #Enough — Chris Murphy (@ChrisMurphyCT) June 15, 2016

Republicans took a dim view of Murphy's step, pointing out that he and other Democrats had already voted to start working on the CJS bill. And mounting a talking blockade merely delays the votes.

"The only thing he's blocking is any effort to vote on the amendments he says he wants. He did, after all, just agree to proceed to the bill," said Don Stewart, a spokesman for Senate Majority Leader Mitch McConnell.

Still, Democrats have failed at all recent attempts to change gun laws, and they hoped they could force an agreement that allows a dozen or so Republicans to break with the positions of the National Rifle Association.

So for nearly 15 hours, 39 of them took turns asking Murphy rhetorical questions designed to highlight things such as people on terrorist watchlists having a 91 percent success rate of buying guns.

“Sen. Murphy and Senate Democrats are holding the floor because they will not accept inaction or half-measures in the face of continued slaughter," said Chris Harris, a Murphy spokesman, at the start of the takeover. "Congress cannot sit on the sidelines while killers freely buy weapons to brutally murder the people Congress is supposed to be protecting."

Some Republicans came to the Senate floor expressing at least some interest in the amendments Murphy wants, but also to raise concerns about potential civil liberties issues with the watchlist bill.

Watchlist critics on both sides of the aisle take issue with the fact that they often include innocent Americans and that it is extremely difficult for those Americans to clear their names. Sen. Ben Sasse (R-Neb.) asked Murphy to clarify exactly what list would be applied to gun buyers. Murphy said it would be a consolidated list that draws on several sources, including the no-fly list.

Murphy acknowledged the concerns about people's right to due process, and argued that Sen. Dianne Feinstein's bill to close that terrorist loophole would have an explicit appeals process to get off the list.

Republicans have offered their own measure, backed by Sen. John Cornyn (Texas), that would bar people on watchlists from buying guns for 72 hours. During this time, a judge would have to find probable cause that the person belonged on the list.

Sen. Pat Toomey (R-Pa.) followed Sasse and suggested that Feinstein's bill would not adequately protect rights. He also said Cornyn's measure does too much to tie the hands of the attorney general and would prevent her office from doing the job effectively.

"There's an obvious opportunity here, guys, to work together and find the solution," said Toomey, who in the past has backed enhanced background checks. "I've been speaking with some of my colleagues on both sides of the aisle, and I think there's an interest in doing this."

Toomey and Cornyn both told reporters later in the day that they were talking with Feinstein, although neither suggested a deal was imminent.

“We all agree that known or suspected terrorists should not be able to get firearms but since we’re talking about a constitutional right there ought to be some requirement,” Cornyn said, referring to his demands for greater due process in the system.

It wasn't until 1:40 a.m. on Thursday that Murphy was able to announce that his talk marathon had resulted in the promise of change.

I am proud to announce that after 14+ hours on the floor, we will have a vote on closing the terror gap & universal background checks — Chris Murphy (@ChrisMurphyCT) June 16, 2016

Murphy ended the filibuster by telling the story of Dylan Hockley, a 6-year-old autistic boy who was slain in the Newtown massacre, and Anne Marie Murphy, the teacher who tried to shield him from the lone gunman's bullets. "Anne Marie Murphy found Dylan Hockley and embraced him," Murphy said. "You know why we know that? Because when the police entered the classroom, that's how they found Dylan Hockley, dead, wrapped in the embrace of Anne Marie Murphy." "It doesn't take courage to stand here on the floor of the United States Senate for two hours or six hours or 14 hours. It doesn't take courage to stand up to the gun lobby when 90 percent of your constituents want change to happen," Murphy said. "It takes courage to look into the eye of a shooter and instead of running, wrapping your arms around a 6-year-old boy and accepting death as a trade for just a tiny, little, itty piece of increased peace of mind for a little boy under your charge." "If Anne Marie Murphy could do that, then ask yourself what can you do to make sure that Orlando or Sandy Hook never ever happens again?" Murphy said, then finally yielded the floor.

Laura Barron-Lopez and Jennifer Bendery contributed reporting.

This post has been updated to note that Toomey and Cornyn said later Wednesday that they have been talking with Feinstein, and to note the conclusion on Thursday morning.

CORRECTION: A previous version of this article incorrectly identified the mass shooting in Newtown as the second most deadly in U.S. history.