The devastation in the wake of a fatal factory explosion was like something "out of the movies", a court has heard.
Derek Moore, Dorothy Bailey, Jason Shingler and Derek William Barks were killed in the blast at Wood Flour Mills in Bosley, Cheshire, in July 2015.
The cause of the explosion is unknown but prosecutors said safety concerns were ignored in the interest of profit.
A firm and its director are standing trial at Chester Crown Court over the deaths and deny manslaughter charges.
The body of Mr Shingler, a 38-year-old charge-hand, was never found in the destruction, with the fire taking days to suppress.
The remains of Dorothy Bailey, the mill's only cleaner, 62; maintenance fitter Derek William Barks, known as Will, 51; and mill worker Derek Moore, 62, were recovered in the days following the explosion.
In court on Monday, the prosecution alleged that wood dust - which it said was recognised as hazardous - had not been dealt with properly, and a build-up of the substance contributed to the explosion.
The court heard that before the blast, one worker had branded the mill "a ticking time bomb", but when staff raised safety concerns, they were told: "We're not making any profits, we need to make money."
Tony Badenoch QC, prosecuting, said: "That position ultimately led to the loss of four lives."
He added: "There was a threat against employees, 'get the machinery running or you will be out of work'."
The jury was told employees described a "make do and mend" approach, with the number of cleaning staff cut from four to just Ms Bailey.
Mr Badenoch said when the Health and Safety Executive was due to visit, other staff would be offered overtime to help clean.
Jurors were also told about a piece of machinery dubbed the "Riverside Dog" - so named, the prosecution said, because its condition was such that it had to be chained to the floor to prevent it moving around.
Wood Treatment Ltd denies four charges of corporate manslaughter.
Its director, George Boden, 64, of Church Road, Stockport, - who was on holiday at the time of the blast - denies four counts of gross negligence manslaughter.
The prosecution said that employees speaking after the blast had complained "almost universally" of "deterioration" at the mill since Mr Boden took over in 2012.
Operations manager Philip Smith, 58, of Raglan Road, Macclesfield, and mill manager Peter Shingler, 56, of Turnstall Road, Bosley, both deny a health and safety offence.
The court heard emergency services were called to the mill following the explosion at 09:11 BST on 17 July 2015 to find flames and casualties, including walking wounded with burns and about 20 "shell-shocked" people standing outside.
One fire officer reported devastation everywhere and said it was like "a scene out of the movies", Mr Badenoch told jurors.
He added more than 800 tonnes of rubble had to be moved, with police divers deployed to underground culverts in a bid to find missing people alive.
Despite a five-month investigation, the cause of the blast has never been established.
"While it is not possible, nor is it necessary, to be certain about the exact sequence of events, there is one obvious certainty," Mr Badenoch said.
"There was a quantity of material which was available to explode in this way - without which there would have been no explosion, there would not have been four tragic deaths, and others would not have been seriously injured."
Mr Boden also denies one count of being the director of a corporate body which committed a health and safety offence.
Wood Treatment Ltd has admitted a health and safety offence relating to the incident.
The trial continues.