Lawyers are taking landmark legal action against the NHS in Scotland, claiming that hospitals breached health and safety regulations in allowing the MRSA superbug to develop in wards.

They say that MRSA is a substance, not just an infection, and that hospitals which report the infection are in breach of the legislation on control of substances harmful to health.

Cameron Fyfe, of Ross Harper solicitors, is waiting for a final hearing in the test case of Elizabeth Miller, who contracted the bug while in hospital for heart surgery. If successful, the case could open the floodgates for 156 victims of MRSA who are each represented by Mr Fyfe.

"This claim is in addition to the claim of medical negligence," he said. "The regulation says that a hospital must be clean and there must not be any substances which could endanger the health of staff or patients.

"In a case which has taken place in England, that has been interpreted as including microbiological things such as MRSA. Even although it is microscopic, it is still a substance and hospitals have a duty to ensure nothing dangerous can be found in wards."

It follows news that the Scottish NHS has been forced to pay out almost £40m in compensation over the past five years. The number of legal claims alleging clinical negligence has also soared, with 465 actions launched in 2006, compared to 400 in 2005.

A Scottish Executive spokeswoman said the amount of compensation paid by NHS Scotland was "proportionately far lower" than the rest of the UK.

She added: "Tackling healthcare-associated infections, such as MRSA, is a priority for the executive and NHS Scotland. The executive has provided £15m to drive this work forward."