Updated

Within hours of a fire at soccer club Flamengo's training facility that would kill 10 teenage players, the club's president called it "the worst tragedy" in the team's 123-year history.

Soccer greats around the world expressed condolences, Rio de Janeiro's mayor declared three days of mourning and the club, Brazil's most popular and one of the most recognizable in Latin America, commemorated the boys during its latest home game on Thursday. Club officials repeatedly said the fire was simply a question of bad luck.

"It was not because of lack of attention and care from Flamengo. These boys are our biggest asset," said Flamengo's CEO Reinaldo Belotti a day after the Feb. 8 blaze. "It was all a succession of events after a catastrophic day for Rio."

But for at least four years before the blaze, the club flouted city and code regulations at the training facility, incurred numerous fines and was the target of a lawsuit by state prosecutors related to the treatment of its academy players and their living quarters, an Associated Press review of city documents and a lawsuit has found. What's more, a material used in the construction of the dorms, polyurethane, could have fueled the fast-moving blaze that engulfed the players, according to fire experts.

The findings raise questions about whether negligence by the team and a collective failure of authorities to regulate the training grounds ultimately played the largest roles in the tragedy.

"This is an irregular construction," city hall spokesman Tiago Costa told The Associated Press when asked about the container-like structures where 26 players were sleeping when fire struck.

Officials have not given an official cause for the blaze, though they have said they are investigating the possibility that an air conditioning unit caught fire after a power surge.

For years, the club had its academy players, teens between the ages of 14 and 16 identified as potential future professionals, sleeping in quarters that were never approved by the city. In fact, the area that burned was licensed as a parking lot, not a dormitory.

The most recent city license for the club, from April of last year, had no mention of sleeping quarters anywhere on the sprawling complex known as Ninho de Urubu in western Rio de Janeiro.

Since the dormitory didn't officially exist, firefighting officials said they did not inspect or certify it.

The burned area "was not part of the security plan against fire or panic presented by the club and approved by the Fire Department," state firefighters said in a statement to the AP.

Bernardo Monteiro, a Flamengo spokesman, told the AP that the team had used the containers since 2010. He said there was one exit and the structures had fire extinguishers and smoke detectors, though could not say how many.

The existence of the containers was well known by authorities.

In March 2015, Rio state prosecutors filed a suit against the club demanding the closure of the training facility unless several irregularities were rectified.

Prosecutors demanded the club "address all the inherent peculiarities in the care of children and adolescents, from the pedagogical, social, psychological and medical all the way to the adequacy of accommodation facilities," read the suit.

The suit also called for the facility to be closed until there was "proof of compliance with the conditions imposed by the Fire Department, Civil Defense and City Hall," and any infraction to be met with a $27,000 fine.

Nearly four years later, no decision was made on the case — until Wednesday, five days after the deadly fire.

In a blistering ruling, Judge Pedro Henrique Alves said that Flamengo hadn't just failed to address the demands in the suit, but also "didn't even inform the court" of other changes it had made since the suit was filed.

Flamengo "used as lodging for adolescents containers that, unfortunately, caught fire, taking the lives of 10 (players) and injuring three others," he wrote, adding that children and adolescents were barred from entering the facility until further notice. Any infraction would result in a US$2.8 million fine.

The club was also frequently in the crosshairs of city officials: it was fined 31 times over the last few years for licensing violations, and in October 2017 the training facility was temporarily closed.

"If you are fined 30 times, you can't keep postponing and get 20 more. Something has to be done," Arthur Antunes Coimbra, one of the club's most famous players known as "Zico," told Globo's SporTV this week.

Police have opened an investigation and say that criminal charges are possible.

Meanwhile, the company that made the dormitory, NHJ do Brasil, told the AP in a statement that its structures were made in accordance with the latest international standards. It also said the structure that burned was made of a metallic shell and lined on the inside with galvanized thermal acoustic panels that had a polyurethane core that was "self-extinguishing."

"In other words, the modules are made of metal and filled in with anti-inflammable material," said the company, which declined to answer whether the structures came with fire extinguishers, smoke detectors or air-conditioning units.

Polyurethane is an expanded plastic, or plastic injected with air, that is widely used in construction. While it can be treated with retardant, it can also burn very quickly if it catches fire from another source, three fire experts not involved in the investigation told the AP.

"Polyurethane foam used in this way is a cheap technology and dangerous from a fire protection perspective," said David Howitt, an emeritus professor at the University of California at Davis and expert in combustion. "These so-called 'fire retardant' foams are not retardants to the degree that the manufacturers suggest and are frequently grossly overstated."

Robert Solomon, a fire engineer with the Quincy, Massachusetts-based National Fire Protection Association, reviewed security camera video of the blaze and pictures of the aftermath. The images show drooping metallic roofs, mangled black panels and many objects so badly charred that they are indistinguishable.

Solomon said he found at least three red flags: only one exit, bars on some of the windows and an apparent lack of basic protective tools like smoke alarms. And the video footage appeared to show "flashover," when every combustible thing in an area is burning, he said. Flashover temperatures, upward of 1,900 Fahrenheit (1,037 Celsius), are so high that a person can become paralyzed, even if the flames are not touching them.

"At that point, it's like being trapped in a prison with no way to escape," said Solomon.

After the fire, the Rio state prosecutor's office formed a task force focused on financial compensation of the victims' families. Many families whose children stay at academies are low income, and sometimes live far from the team.

Some family members and friends of victims have quietly questioned the safety measures the team had in place.

"There should have been an emergency door. There wasn't," said Severino Fausto Santana, while attending the funeral of 15-year-old nephew Samuel Thomas de Souza Rosa. "That's why the 10 (boys) died."

But for the most part, families have remained quiet, either declining to speak about Flamengo or lauded the club's effort at a time of great grief.

"Flamengo is very useful and helping with everything," said Sergio Morikawa, who was not the biological father but was helping to raise 15-year-old Vitor Isaias, one of the kids who died. "I don't want to judge, work myself up or blame anyone."

____

Follow Diane Jeantet: twitter.com/dianejeantet

Follow Peter Prengaman: twitter.com/peterprengaman