Junior doctors are working irregular shifts which could be endangering patient safety, a report has claimed.
According to BMA Scotland, rotas introduced to comply with European employment law were causing "considerable fatigue" for medics.
Examples included juniors working seven consecutive 12.5 hour night shifts.
The report said such intense shift patterns may carry "unacceptable burdens of risk to doctors and patients."
The traditional 24-hour on-call pattern for junior doctors has now moved to more regimented shifts, BMA Scotland said.
This could include a week of night shifts followed by a week of late shifts, with a day or two off in between, which would be compliant with the European Working Time Directive (EWTD).
But the report warned working long periods of unsociable hours can raise the risk of sleep deprivation for doctors.
Dr Gordon Lehany, chair of BMA Scotland's Scottish junior doctors committee, which produced the report, said this could be detrimental to the health of medics and patient care.
He said: "It is important that as NHS boards try to become compliant with European Working Time regulations they also consider safe shift-working patterns.
"To do this effectively, junior doctors should be involved in drawing up rotas.
"It is essential that the problems associated with working irregular shift patterns are recognised and reduced."
The report has also called for more rest breaks and for shift lengths to be as short as possible.
Labour health spokesman Dr Richard Simpson said more should have been done to ensure the NHS was prepared for the introduction of the EWTD.
"The changes were designed to improve patient safety and it is essential that this is not compromised by shift patterns that may lead to bad decisions being taken by overworked and tired doctors," he said.