Doctors said they were under pressure to meet waiting time targets
Junior doctors at a hospital in West Lothian have warned that a "disaster is brewing" because of a lack of staff.
A letter signed by 17 medics, passed to BBC Scotland, said St John's in Livingston was overloaded, resulting in dangerous medical care.
They said the volume of patients meant they were unable to treat emergency cases within government targets.
NHS Lothian said it had since met the doctors and all the issues raised had been addressed.
In a statement it said there were more doctors and nurses working at St John's than ever before.
The letter listed a series of complaints and said the hospital had too few medical staff.
As a result, they said they were finding it hard to treat accident and emergency cases within the government target of four hours.
The doctors complained that meant cases were having to be dealt with based on how long patients had been waiting, rather than the seriousness of their condition.
Andew Conway-Morris, of the British Medical Association's junior doctors committee, said such targets could lead to poorer care.
He said: "There is always a risk with targets being set which can distort clinical priorities.
"So we have patients that need to be seen within a certain period of time and they are getting up to three hours 50 minutes and someone more unwell comes in.
"There's a temptation to treat those who are about to breach the target rather than those who need care most urgently."
Claire Lynch, who has campaigned against the downgrading of St John's, said she was not surprised by the doctors' concern
"It's sad that the people of West Lothian are being given a very poor standard of care and now staff are indentifying that," she said.