As the school shooting in Parkland, Fla., stokes the national debate over firearms, it may be easy to overlook another major development in the gun world this week.

One of the nation’s oldest and largest gun makers, Remington, said it was nearing a bankruptcy filing.

Hit with slumping sales and unable to sell itself, Remington has negotiated a deal with its lenders to cut its debt and keep operating.

Other gun makers are also struggling. Colt completed its trip through bankruptcy last year, while sales and profits at Smith & Wesson’s parent company have plummeted and its stock price is sagging. All three companies make a version of the AR-15-style semiautomatic rifle, which was used by the killer in Parkland on Wednesday and is the weapon of choice for mass shootings.

The problems demonstrate the paradoxical and tumultuous nature of the gun industry. It has prospered when the prospect of tighter regulations induces people to buy more guns.

And it slumps when that threat of new regulation subsides, as it has done during the Trump administration. President Trump, who has called himself a “true friend and champion” of guns, did not mention gun control in his remarks on Thursday about the Parkland shooting. And many leaders in the Republican-controlled Congress, where gun restrictions have withered over the years, have shown no change of heart in light of this week’s school shooting.

“When people feared there would be increased gun regulation, they went out and bought more guns,” said Kevin Cassidy, an analyst at Moody’s Investors Service, who covers the gun manufacturers.

During the Obama administration, F.B.I. background checks on prospective firearms buyers — a rough proxy for sales — surged nearly 50 percent in the month of the Sandy Hook attack in 2012, compared with the same month a year earlier, as calls rang out for tighter legislation. Similarly, the number of background checks swung up more than 43 percent after the shooting in San Bernardino, Calif., in 2015 and nearly 40 percent after the massacre in Orlando six months later.

But that trend has reversed since Mr. Trump has been in office. In October, when a gunman killed 58 people in Las Vegas and injured hundreds, background checks slumped, falling 13 percent from the same month a year earlier.

Over all, background checks tumbled more than 8 percent last year, the largest fall since the F.B.I. began keeping track in 1998.

“There is no panic buying of guns because there is clearly no threat of federal government action in response to mass shootings that would restrict or regulate firearms,” Daniel Webster, the director of the Johns Hopkins Center for Gun Policy and Research, wrote in an email. “The gun lobby can’t scare their followers into thinking Donald Trump would sign any piece of gun control legislation as they could under an Obama presidency.”

Remington, founded in upstate New York by Eliphalet Remington II in 1816, is the oldest manufacturer of rifles and shotguns in the country.

DuPont, the chemical company, bought a majority share in Remington in 1933, purchased the firearms maker outright in 1980 and then sold it to an investment firm in New York in 1993. The private equity firm Cerberus Capital Management bought the company in 2007 for $118 million and rolled it up with other gun manufacturers into a conglomerate called Freedom Group.

Under Cerberus, the company enjoyed years of expanding gun sales. In 2012, the number of guns made in the United States totaled 8.5 million, more than double the 3.3 million that were produced a decade earlier.

But in December 2012, a gunman walked into Sandy Hook Elementary School in Newtown, Conn., and killed 20 children and six adults. When the authorities reported that the gunman had used an AR-15-style rifle made by Remington, public anger focused on the manufacturer.

Large investors, like the California State Teachers’ Retirement System, began taking steps to divest from the gun maker. Cerberus said it would seek to sell the company.

Despite the public outcry, the fallout from Sandy Hook helped the company’s bottom line. Spurred by calls that gun controls were imminent, buyers purchased more Remington firearms, and sales surged 36 percent, to $1.3 billion in 2013, Moody’s said.

Some investors may have had objections to Remington, but not everyone. After the Sandy Hook shooting, Remington was able to borrow millions more as gun production boomed, particularly heading into the 2016 presidential election because Hillary Clinton was expected to win and push for tighter gun controls.

The company borrowed $12.5 million from the City of Huntsville, Ala., in 2014 to open up a new plant there. The city has agreed to eventually forgive the loan if Remington meets hiring targets over a number of years, said Chip Cherry, chief executive of the Chamber of Commerce of Huntsville and Madison County.

Remington also borrowed $175 million to buy out investors that wanted to divest. (Remington has paid out a total of $48 million, according to a company filing.)

The company does not disclose its lenders, but an analysis by Morningstar shows that some of Remington’s debt is held in funds managed by JPMorgan Chase. Oppenheimer, the large mutual fund company, also owned some of the bonds issued by Remington, but said it sold its debt holdings last year.

In 2017, Mr. Trump’s first year in office, sales fell 27 percent in the first nine months (the most recent data available) from the same period a year earlier. After production was ramped up in expectation of a Clinton presidency, gun inventories have piled up.

On Monday, Remington announced that its lenders had agreed to cut its $948 million debt load by $700 million in exchange for an ownership stake in the company. Analysts said at the time that even with its lower debt, the company still faced a challenging sales environment.

But this week, things are looking up to some on Wall Street. The price of Remington’s bonds have increased more than 16 percent since Wednesday — a sign that some investors believe the company has promise.