PHILADELPHIA — Ikea will pay $50 million to the parents of the three toddlers who died when its dressers toppled onto them, lawyers for the families said Wednesday.

The settlement ends wrongful-death suits filed by the families and comes six months after those deaths and others prompted the unprecedented recall of 29 million Ikea dressers. At the time, the company acknowledged the dressers were at serious risk of tipping onto and killing children.

“Ted’s death was completely preventable,” Janet McGee of Apple Valley, Minnesota, whose 22-month-old son Theodore died last February when a Malm dresser fell on him, said in a statement. “We would never want other parents to have to experience what we have been forced to endure. This has been a tragic, heartbreaking season for us and our family, and no amount of money will make up for the loss of our sweet little boy.”

The plaintiffs also include the parents of Curren Collas, a 2-year-old from West Chester, Pennsylvania, and Camden Ellis, a 2-year-old from Snohomish, Washington. Both died in 2014.

The $50 million will be split equally among the three families.

As part of the settlement, Ikea has also agreed to make $50,000 donations to three children’s hospitals in the names of the boys. The lawsuits, filed in Philadelphia court, claimed the Ikea dressers were “defective and dangerous” and that the Sweden-based retailing giant continued to sell them despite the risk, while not properly warning consumers.

In all, seven deaths have been publicly linked to unstable Ikea dressers, the first in 1989.

The settlement came shortly after Ikea gave the parents’ attorneys internal documents it had long fought to keep confidential.

In September, the company risked sanctions when it defied a Philadelphia Judge John Milton Younge’s order to provide the files. Legal experts called the resistance unusual, and the judge said Ikea’s refusal made him “start to wonder” what was in the documents.

Under the settlement, the contents of those records will remain private. The families’ attorneys agreed to return the files to Ikea, with the stipulation that company not destroy them.

“That was important to us and to the families,” said attorney Daniel Mann of Feldman Shepherd, the Philadelphia firm that represented the families. “In the event there are other children this happens to, their families to be able to see what we have seen.”

Ikea, which has its U.S. headquarters in Conshohocken, Pennsylvania, could not immediately be reached for comment.

Ikea has made previous payouts to the parents of at least two other children.

In 2008, Ikea paid $2.3 million to the parents of Katie Elise Lambert, a 3-year-old Huntingdon Valley, Pennsylvania, girl who had been crushed by a wardrobe.

In 2009, Ikea settled with the parents of a 3-year old girl from Chula Vista, California, who died when a dresser tipped onto her.