Eight people died and seven were injured when they accidentally triggered a fire extinguisher system inside the vault of a major Thai bank, releasing a suffocating cloud of chemicals.

The accident occurred late last night in a basement security vault at the headquarters of the Siam Commercial Bank in Bangkok, one of the country's largest financial institutions.

SCB blamed the accident on contractors who had been working to upgrade the building's chemical fire extinguishers but mistakenly set off the system, releasing a chemical retardant designed to starve any fire of oxygen.

"The work may have triggered the Pyrogen aerosol which, once it works, will decrease oxygen, that could cause people's injuries and death," the bank said in a statement.

An emergency medical centre said five people were killed at the scene while three others passed away in hospital.

Seven workers were injured, four of them critically, the centre added.

Police said seven of those killed were contractors, including one woman. The eighth victim was a security guard from the bank.

"It's too early to say who is to blame. We need time for experts to investigate the details," a police chief told reporters.

Rescue workers had to battle haze to reach victims. One picture published by local media showed firefighters, wearing masks and handkerchiefs over their faces, extracting workers on stretchers from inside a building filled with thick, pale smoke.

Bodies were brought out wrapped in white blankets while paramedics could be seen trying to resuscitate victims on the pavement.

"SCB would like to express its sympathy to those injured and killed," the bank said in its statement, adding it was cooperating with police.