Within hours of the worst mass shooting in U.S. history a year ago in Las Vegas, the federal agency in charge of regulating guns found itself under pressure to ban a rapid-fire device and penned in by legal boundaries that officials said prevented them from acting quickly, according to newly disclosed emails from inside the Bureau of Alcohol, Tobacco, Firearms and Explosives.

Blame rained down on the ATF after gunfire showered concertgoers from a 32nd-floor room at the Mandalay Bay hotel Oct. 1, leaving 58 dead and more than 800 injured. Critics popped up everywhere – cable news anchors and politicians on both sides of the aisle, the National Rifle Association and Gabrielle Giffords’ anti-gun-violence group, and even from the ATF’s own ranks of current and former agents.

The focus was Slide Fire, a plastic add-on known as a “bump stock” that allowed Stephen Paddock to run through more than 1,100 rounds of ammunition in 10 minutes. Bump stocks were affixed to half of Paddock’s guns. Since 2010, up to 520,000 of the devices have been purchased in the USA, the Department of Justice reported.

The emails offer an unvarnished look inside the agency as it reacted to the tragedy. They help explain why, despite almost immediate bipartisan support for a ban and an endorsement several months later by President Donald Trump, bump stocks continue to be available in most of the country.

As ATF agents in Nevada helped police investigate the massacre, the political storm began building in Washington. Were bump stocks legal? Even the ATF director wasn’t sure.

“Are these ‘ATF approved’ as advertised?” Tom Brandon asked technology branch chief Earl Griffith the day after the shooting in one of the 5,300 pages of emails released this month after Freedom of Information Act requests by USA TODAY and Democracy Forward, a left-leaning watchdog of the executive branch.

Hours later, Brandon had his answer.

“They are approved as advertised. ... We have also approved other bump-fire type devices in the past,” Griffith wrote. The technology branch determines whether new devices are legal.

Brandon traveled to the agency’s facility in West Virginia four days after the shooting to fire a gun with a bump stock himself, the emails show. Later, he testified to Congress that in the interest of public safety, a law should ban them.

Behind the scenes, the agency seemed blindsided by the criticism.

“We are getting killed right now,” a public affairs staff member wrote to a colleague Oct. 5.

“We, ATF, are getting hammered with the narrative we approved the bump stock. … It’s extremely political now with the NRA and some GOP congressmen jumping on us. We are in crisis mode,” another wrote two days later. The ATF withheld the names of the staff members.

Soon, public affairs staff urged media via email to avoid saying the devices were ATF “approved,” as manufacturers claimed. Instead, they said, more accurate language would clarify that the federal agency has the power only to “classify” and “evaluate” machine-gun-like devices.

Asked about the internal emails, ATF spokesman Brad Engelbert said employees “hold a wide range of personal views and opinions on the topic of the day.”

“These individual personal opinions are not the official position of ATF,” Engelbert said.

Eleven states – California, Connecticut, Delaware, Florida, Hawaii, Maryland, Massachusetts, New Jersey, Rhode Island, Vermont and Washington – have banned bump stocks. Across the nation, more than a dozen other cities and states are considering bans.

But a year after the Vegas massacre, online retailers still market the plastic bolt-on stocks for less than $200, and the ATF has evaluated more than 180,000 comments on the ban proposed by the Department of Justice. A final decision could come in the next month.

Bump stocks effectively hobble the ATF’s authority to regulate the sale and ownership of machine guns by making regular semiautomatic weapons function like a machine gun. The device has been allowed to remain on the market through three presidential administrations, beginning in 2003, the emails show.

The ATF has had the authority to make owners register machine guns dating back to a 1930s law and Al Capone’s Tommy guns – among the few weapons tracked by the government, a time-consuming and expensive licensing process.

Bump stocks short-circuit that process by combining two legal devices, a plastic stock and a firearm, that together function like a machine gun. The bump stock harnesses the recoil of the rifle to accelerate trigger pulls, technically “bumping” the trigger for each shot after it bounces off the shooter’s shoulder.

Former agent Michael Bouchard, president of the ATF Association of agency retirees, wrote to lawmakers the week of the shooting to defend the agency from criticism that it had approved the devices. Bouchard faulted Congress.

“We would like to clarify this confusing issue to protect honorable ATF employees from false allegations that they chose to make this item legal, when it was the law that prohibited them from regulating the item,” Bouchard wrote.

In an interview with USA TODAY, he said the ATF is squeezed not only by regulations but also by gun manufacturers, who argue for consistency in rulings and will sue over any deviation based on political pressure or public safety, which they say shouldn’t be part of the legal determination.

Pleas for the ATF to take an aggressive stance and ban bump stocks came within a day of the shooting. Retired ATF agent David Chipman was among the first to jump into the fray.

“Only group quieter than NRA this week is ATF. An agency with vast experience preventing gun violence silenced when they should preach,” Chipman wrote on Twitter.

The internal ATF emails indicate that criticism reverberated around the agency. It was clipped and shared up the ranks to the director’s desk.

“Agents were collectively stunned about what happened, and then there’s universal agreement that this needs to be changed urgently and legislatively because it’s a workaround to circumvent the regulations on machine guns,” Chipman told USA TODAY.

As public support swelled that week for a ban, the NRA made a rare call for increased ATF regulation of the device, a move the group preferred to legislation that could prompt a broader anti-gun vote in Congress.

Chris Cox, executive director of the NRA’s Institute for Legislative Action, took credit for stopping the imminent passage of the bipartisan legislation that would have banned the device in an online interview Oct. 26 with YouTube personality James Yeager.

“We needed to slow the process down,” he said. “We are strategically working to make sure really bad policy doesn’t become law.”

Two days later, Brandon and his assistant director for public affairs noted a surge in interest in bump stocks. In an email exchange, they discussed a Boston Globe article that showed the “once obscure devices flying off the shelves” and selling at five times their sales price on the secondary market.

“Supply and demand = $,” Brandon emailed Chris Shaefer on Oct. 28.

“Absolutely amazing … right?” Shaefer responded.

The ATF emails trace the path of misinformation about approvals of the bump stock and similar devices.

The week after the shooting, Brandon and others briefed Trump about the approval of the Slide Fire device in 2010. In ensuing TV appearances, White House adviser Kellyanne Conway pinned blame on the Obama administration’s ATF, adding that as a result, the device couldn’t be regulated under law.

Trump picked up Conway’s language months later in announcing a regulatory ban – one that has yet to start.

“Obama Administration legalized bump stocks. BAD IDEA,” the president tweeted in March. “As I promised, today the Department of Justice will issue the rule banning BUMP STOCKS with a mandated comment period. We will BAN all devices that turn legal weapons into illegal machine guns.”

The internal emails lay out a longer regulatory timeline for the devices. A total of 25 “accelerator devices,” including bump stocks, were analyzed beginning in 2003, under President George W. Bush’s ATF. One bump stock was approved in April 2017 – well into the Trump administration.

Brandon has been part of senior leadership at the ATF since 2011 and began working at the agency in 1989. He took over after the previous director, B. Todd Jones, resigned amid gun rights backlash over a regulatory ban of ammunition that could pierce bulletproof vests.

Last December, the ATF issued its first notice of rule-making to ban bump stocks under the National Firearms and Gun Control acts. In February, Trump signed a memo directing Attorney General Jeff Sessions to ban the devices, accelerating the process. Both actions came as bipartisan legislation stalled on Capitol Hill.

That started the formal rule-making at ATF that continues as the agency evaluated the flood of comments and at the end of last week sent the rule on to the Office of Management and Budget for a review of up to 90 days.

Bouchard, the retired agent organization leader, said he was not surprised Congress shied away from a clear legislative fix and instead pushed the agency to change a rule about the devices.

“It’s the perfect way to kick the can down the road, knowing that nothing would be done for months or years – and then there’s likely to be a civil case,” Bouchard said, referring to the anticipated raft of lawsuits by bump stock owners and manufacturers to overturn any ban.

The ATF’s comment period on the rules banning bump stocks closed in June. The ban clarifies that bump-stock-type devices would be considered machine guns because they allow “a continuous firing cycle with a single pull of the trigger” and owners would need to surrender or destroy them.

The agency spent months wading through comments from individuals and form letters – led by pro-gun groups such as Gun Owners of America and gun control groups such as Giffords’, according to an analysis by The Trace, an online news site focused on gun policy.

If the rule is approved by the ATF and published in the Federal Register, the devices could become illegal immediately, and possession would carry a federal fine and prison time. The NRA lobbied the ATF in its formal comment on the rule for an amnesty period allowing bump stock owners time to destroy or turn over the devices.

Representatives from Democracy Forward, the group that sued to accelerate the release of the internal emails, said the ban is likely to be published soon. Democracy Forward is not the only group that took an interest in the ATF’s internal debate over ways to reverse course on bump stocks.

Mississippi Second Amendment attorney Stephen Stamboulieh received copies of the emails and fed some to pro-gun online news sites such as Ammoland. Stamboulieh said he is poised with a Washington plaintiff to fight for an injunction against the anticipated ban. He said the ATF would break the law and create 500,000 unwitting felons overnight.

“I’m going to sue them day one,” Stamboulieh said.