Federal regulators that can be held responsible for defective goods sold by third-party merchants on its online marketplace, rejecting the company's position that it's merely an intermediary between consumers and sellers.

In released Tuesday, the U.S. Consumer Product Safety Commission said the agency unanimously agreed Amazon "fits squarely" within the definition of a distributor of goods, "and therefore bears legal responsibility for their recall."

As part of the agency's decision, Amazon is required to develop a plan to notify purchasers and the public about the product hazards, as well as offer shoppers refunds or replacements for the affected products.

Amazon's marketplace, which hosts millions of third-party sellers, now accounts for of the company's e-commerce sales. While the marketplace has helped Amazon bring in record revenue, it has also proven to host , and even . The company has previously said it invests hundreds of millions of dollars per year to ensure products sold are safe and compliant.

The decision addresses a thorny issue that's been debated for years. In numerous lawsuits, Amazon has maintained it just serves as the conduit between buyers and sellers on its marketplace and that it's not involved in the sourcing or distribution of products sold by third-party sellers, removing it from liability. That has been a successful defense for Amazon in the past, including concerning the purchase of a faulty hoverboard that exploded and burned down an Amazon shopper's house in Tennessee. In other cases, and have said the e-commerce giant should be held liable.

In 2021, the CPSC Amazon to force it to recall hundreds of thousands of products that it deemed hazardous. At issue were 418,818 goods sold through Amazon, including faulty carbon monoxide detectors, hairdryers without electrocution protection and children's sleepwear that posed a burn risk.

Amazon argued in its response to the agency complaint that it should be characterized as a third-party logistics provider, saying it only receives and transports the products sold through its site.

Still, Amazon removed all the products flagged by the CPSC and prohibited merchants from selling them on its marketplace. The company informed shoppers who purchased the items of "potential safety issues," told them to destroy the items and offered a credit.

The CPSC called these actions "inadequate," saying the company should've offered refunds to incentivize consumers to destroy or return the product.

In Tuesday's ruling, the agency said an administrative law judge dismissed Amazon's argument that it should be classified as a third-party logistics provider. The judge pointed to Amazon's Fulfilled by Amazon service, where sellers ship inventory into the company's warehouses, and those products are stored until they're purchased.

This program gives Amazon "far-reaching control" over the products sold on its platform, the judge said.

"Amazon cannot sidestep its obligations under the [Consumer Product Safety Act] simply because some portion of its extensive services involve logistics," the decision states. "Amazon must therefore comply with the CPSA to protect consumers from injury."

An Amazon spokesperson said in a statement that the company is "disappointed" by the CPSC's decision and plans to appeal. They added that Amazon stands behind the safety of every product in its store, regardless of whether it's sold by the company our a third-party seller.

If a product is recalled, Amazon removes them from its platform and informs shoppers of any product safety information, the spokesperson said. In 2021, the company to allow shoppers to contact Amazon directly with any complaints of faulty goods, rather than communicating with the third-party merchant.

WATCH: