The cause of an explosion which killed nine factory workers was revealed for the first time yesterday ahead of a court trial.

A preliminary hearing at the High Court in Glasgow was told the blast, which killed five men and four women at the Stockline plastics factory in the Maryhill area of the city, happened after petroleum gas ignited in a pipeline.

Prosecutors yesterday said evidence relating to the deaths and the cause of the blast have been agreed with the defence ahead of next month's trial of two companies which owned the business. They face four charges brought under the Health and Safety at Work Act.

The trial was expected to begin on August 13 and last 12 days but defence QC Paul McBride told the hearing yesterday ongoing discussions with the prosecution could have a "significant impact" on the trial and could reduce its duration. He also said a huge amount of technical evidence had also been agreed.

Mr McBride said relatives of the nine killed and 40 injured in the blast on May 11, 2004, would not have to give evidence "about the tragic circumstances of that day".

Mr Angus Stewart, QC, for the prosecution, revealed the cause had been agreed between the Crown and the defence. He told judge Lord Hardie: "The cause of the explosion was the ignition of petroleum gas in a pipeline which over the years had corroded."

ICL Tech Limited and ICL Plastics Limited, which owned the Stockline factory, face charges alleging they failed to ensure their workers were not exposed to risks of personal injury and death from fire, explosion and other dangers arising out of corroded pipes and an escape of liquid petroleum gas which accumulated in the basement and exploded.

The Stockline blast, Scotland's worst workplace accident since the Piper Alpha oil rig explosion in 1988, reduced the four-storey factory to rubble. Rescuers likened it to an earthquake scene.

Up to 200 firefighters were involved in the painstaking and dangerous rescue operation, using thermal imaging cameras and heat-seeking equipment as they worked through rubble to recover bodies and free trapped workers.

An RAF helicopter from east Yorkshire flew to Glasgow to ferry specialist dog teams and their handlers to the site.

Experts from Grangemouth-based International Rescue, which specialises in earthquake disasters, used carbon dioxide detectors and specialist cameras.

Up to 140 officers were involved full-time in the police investigation into the factory blast. Between 60 and 80 detectives gathered statements from potential witnesses and a further 60 officers were at the Maryhill site with Health and Safety Executive experts to recover physical evidence.

As well as carrying out door-to-door inquiries in the area around the plant, officers took statements from current and former employees at the firm's other plants in Dundee, Edinburgh and Newcastle. Information was fed into the Holmes computer system, developed after the hunt for the Yorkshire Ripper, which collates and analyses data.

Annette Doyle, 34, Thomas McAuley, 41, Tracey McErlane, 27, and Ann Trench, 34, all from Glasgow; Tim Smith, 31, of Johnstone, Peter Ferguson, 52, of Kilbarchan, Kenneth Murray, 45, from Paisley, all Renfrewshire; Margaret Brownlie, 49, of Strathaven, South Lanarkshire; Stewart McColl, 60, from West Kilbride, North Ayrshire, died in the blast.

Last May, three years after the tragedy, a memorial garden featuring a stone circle to remember the nine victims, was unveiled close to where the factory stood.

Brian Sweeney, Strathclyde Fire and Rescue Service's most senior officer, was honoured with the Queen's Fire Service Medal for his role in leading the rescue operation.