The Consumer Product Safety Commission filed suit Wednesday to stop the company that distributes the popular Buckyballs magnets from selling the product, a legal tactic that the agency has used only once before in the past decade.

The agency alleges that the magnets pose a grave danger to children. The CPSC says it filed the administrative complaint only after New York-based Maxfield & Oberton refused to voluntarily recall the powerful BB-size magnets, which are sold in sets of 216.

While these magnets have been marketed as desk toys for adults, the agency’s complaint cited numerous incidents in which children younger than 14 swallowed the magnets, sometimes after using them to mimic tongue or lip piercings.

When two or more of the magnets are swallowed, they can attach to each other, ripping holes in the stomach and intestines or causing other serious injuries, blood poisoning and death. The agency said it knows of more than two dozen magnet ingestion cases since 2009. At least a dozen of them involved Buckyballs, and some required surgery, including a 4-year-old boy who ingested three Buckyballs that he thought were chocolate candy, the agency said.

Retailers that were alerted in advance of the federal agency’s lawsuit — including Amazon and Brookstone — agreed to stop selling the popular Buckyballs, Bucky­cubes and other similar products. Ebay also agreed to take steps to remove listings of these items, according to the CPSC.

More than 2 million Buckeyball sets and 200,000 Buckycubes have been sold in this country since 2009 and 2011, respectively.

Maxfield & Oberton, which has cooperated with the commission in recent years to warn about the misuse of the magnets, said it was stunned by the agency’s actions.

“Thank you for trying to drive a $50 million New York-based consumer product company out of business,” the company shot back in a statement on Wednesday. The magnet-distributor blasted the commission for filing a lawsuit, alleging the CPSC did not give the company a chance to make its case. Instead, the regulators asked the retailers to stop selling the magnets and gave them 48 hours to respond, the company said.

These “intimidation tactics” have ruined the retailer’s base without good reason, Craig Zucker, the company’s chief executive said. He added that it is unreasonable for the agency to react in such a way to two dozen cases of misuse when more than half a billion magnets are on the market.

“The bureaucrats see danger everywhere, and those responsible people — like our company who have vigorously promoted safety and appropriate use of our products — gets put out of business by an unfair and arbitrary process,” Zucker said in a statement.

Typically, when the CPSC learns of potentially dangerous products, the company involved initiates a voluntary recall at the commission’s request. The last time the agency sued to force a recall was in 2001, when it tried to stop the sale of BB guns made by Daisy Manufacturing. The case was settled after Daisy agreed to prominently display more safety warnings on its products and launch an educational campaign.

Buckyballs, made in China, were initially marketed as a children’s toy when they were introduced in this country more than three years ago, the commission’s complaint said.

In May 2010, the company voluntarily recalled 175,000 Buckyball sets at the commission’s request because their labels said products were intended for ages 13 and older. Federal rules prohibit such loose magnets from being sold to kids younger than 14.

Since the recall, the company has changed its labeling to reflect the older demographic. The company has put warnings in five places on its packaging to notify consumers that its products are not intended for children. And it has set up a Web site devoted to educating doctors, parents and retailers about safe use of its magnets.

The commission continued to receive reports of injuries to children even after it worked with the company to warn the public about the dangers. The commission issued a safety alert in November 2011.

In its lawsuit, the CPSC said the warnings alone are not effective and that the misuse of these magnets is “inevitable.” Despite the warnings, parents and children do not appreciate the hazards, the lawsuit said.

Also, once the magnets are removed from their carrying cases or shared among children, the end users may not have had any exposure to the warnings.

The North American Society for Pediatric Gastroenterology, Hepatology and Nutrition said it has seen an increase in magnet ingestion among children and teens. On Wednesday, the group and some consumer advocates voiced support for the lawsuit.

Mark Gilger, a gastroenterology specialist at Texas Children’s Hospital in Houston, said his hospital has had five young patients who have swallowed tiny magnets in the past four months. One required surgery.

Maria Oliva-Hemker, chief of the pediatric gastroenterology division at Johns Hopkins Children’s Center, said some children have lost substantial parts of their small bowel by swallowing Buckeyballs-type magnets. “We know of cases . . . where you can have an entire string of these magnets hooking together in the intestines,” she said.