Remington, a company that began making flintlock rifles when there were only 19 United States, has filed for bankruptcy protection.

Mounting debts at the arms manufacturer have snowballed, ironically, since the election of Donald Trump, who has called himself a "true friend" to the gun industry.

Remington, which as roots dating to 1816, has lined up $100 million with lenders to continue operations. It remains unclear what will happen to its 3,500 or so employees as it reorganizes.

Panic sales that drove revenue for gun makers ever higher evaporated with Trump's arrival in the White House. Fading sales and Remington's production of one of the most well-known weapons in the world, the Bushmaster AR-15, have overwhelmed the Madison, North Carolina, company.

Late Sunday, according to records from the bankruptcy court of the district of Delaware, Remington Outdoor Co. agreed to a prepackaged deal that would give holders of the company's $550 million term loan an 82.5 percent stake, according to a release.

Accessories manufacturer Kevin Kao, of Irvine, Calif., examines a military grade Remington Adaptive Combat Rifle at the 35th annual SHOT Show in Las Vegas. U.S. gun maker Remington Outdoor Company filed for bankruptcy protection, after years of falling sales and lawsuits tied to the Sandy Hook Elementary School massacre. (Julie Jacobson / AP)

Third-lien noteholders will take 17.5 percent of Remington and four-year warrants get a 15 percent stake.

The Bushmaster AR-15 rifle was used in the Sandy Hook shooting in Connecticut in which 20 first-graders and six educators were killed in 2012.

The same type of gun was used to kill 17 in a Parkland, Florida, high school, a massacre that lead to drew hundreds of thousands of anti-gun violence protesters to the capital and to the streets in cities across the nation this past weekend.

The company was cleared of wrongdoing in the Sandy Hook shooting, but investors wanted nothing to do with it. Cerberus Capital Management, which had acquired the company in 2007 as gun sales began to boom, tried to sell it less than a week after the shooting.

There were no takers.

But it was larger trends already underway that doomed Remington.

Arms manufacturers had for years ramped up production as gun ownership became a red-hot social, and political flashpoint. Some gun-rights advocates have binged on guns on the misguided belief that a Democratic administration would harshly restrict gun sales.

Those misperceptions became moot with Trump's rise to the White House.

Trump was the first sitting president to address the National Rifle Association in three decades, telling members at their annual meeting last spring that "You have a true friend and champion in the White House."

Any belief that more restrictive regulation was on the way faded quickly.

In 2017, firearm background checks, a good barometer of sales, declined faster than in any year since 1998, when the FBI first began compiling that data.

But there were clear signs that gun sales, even as production increased, were already in decline. That is partially because a larger percentage of guns in the U.S. are owned by an increasingly small group of people.

According to a recent study by Harvard University and Northeastern University, the number of privately-owned guns in America grew by more than 70 million to approximately 265 million between 1994 and 2015. But half of those guns are owned by only 3 percent of the population.

That smaller base of what are sometimes referred to as super-owners has made the industry more unstable.

In 2015 Colt Holdings Co., another storied gun maker, filed for Chapter 11 bankruptcy protection.

Profit growth at Sturm, Ruger & Co. is under severe pressure and the company's shares are down 18 percent this year.

Some of Wall Street's heaviest hitters are stepping into the national debate on guns as investment firms ask firearms makers what they are doing about gun violence.

BlackRock is a major shareholder in gun makers Sturm Ruger, American Outdoor Brands, and Vista Outdoor Brands. About a week after the shooting in Parkland, BlackRock said it wanted to speak with the three firearms makers about their responses to the tragedy.

It's also looking into creating new investment funds for investors that exclude firearms makers and retailers.