Retailer John Lewis is facing a fine after pleading guilty to exposing construction staff to asbestos during a refurbishment of its Edinburgh store.
Morris and Spottiswood, which was contracted to carry out the revamp, could also be fined after admitting to three health and safety offences.
Neither of the firms carried out the necessary checks for asbestos before they allowed the work to begin in 2008.
Asbestos was disturbed during the work and 15 staff were potentially exposed.
If asbestos is disturbed it can release harmful fibres into the air, which may lead to diseases such as cancer, lung scarring and serious respiratory problems.
But the effects of the illness may not become apparent until up to 40 years later.
Edinburgh Sheriff Court heard John Lewis called in the contractors to refurbish the top floor of the St James Centre department store.
Procurator Fiscal Maureen McGovern described three types of checks for asbestos which should be carried out, the first two being suitable only for "day-to-day checks on households".
But "type three", described as "getting into every nook and cranny to ensure there is no risk of asbestos exposure", is the one which the two companies should have used.
Instead, they used type two, which resulted in a board with asbestos material going undetected, while unsuspecting workmen started taking down partition walls, and brushing away dust materials with their hands.
On discovering the suspect board, a joiner alerted his superiors and the work was halted.
However, the court heard the work was allowed to recommence after John Lewis staff failed to identify the correct board and take it away for testing.
Ms McGovern said: "The potential risk of what could have happened is very great, and both companies did not make the suitable safety checks, nor did they ensure that the other one had."
Barry Matheson, managing director of the Edinburgh store, said: "John Lewis takes the health and safety of our partners (staff) and customers very seriously, and has developed extensive procedures to ensure our network of shops across the UK are safe places to work and shop.
"During office refurbishments in 2008 however, there was an isolated incident when the protocol for asbestos testing was not properly followed in our Edinburgh shop. The incident occurred in an area that is not accessible to the public and our customers were not at risk at any time.
"Since the incident, we have implemented comprehensive new training for partners backed-up by refresher courses, clearer communication and senior management involvement, ensuring we always enforce strict procedure with all health and safety matters."
'Cannot happen again'
A Morris and Spottiswood spokesperson said: "This was an error of judgment rather than a disregard for the stringent safety protocols we have in place for dealing with asbestos.
"This was mitigated by the fact that our employees have received extensive asbestos training and took correct and immediate actions to avert any possible further danger."
The spokesman said the firm had reviewed its porcedures and "introduced additional robust measures to ensure this cannot be allowed to happen again".
The case was taken to court after a 12-month investigation by officers from Edinburgh City Council.
Robert Aldridge, the council's environmental leader, said: "Our expectation as an enforcing authority is that large organisations should be leading the way on these important issues and should not be failing to meet basic minimum requirements."
Sheriff Elizabeth Jarvie deferred sentencing until 9 November.