Doctors' leaders said today they would support overworked junior medics who decide to take legal action after new limits on working hours are introduced.
The European Working Time Directive, which has covered most UK workers since 1998, will extend to doctors in training from Sunday, limiting their hours to a maximum of 58 a week.
But research suggests that many hospitals are not ready for the changes, meaning they can be fined up to £5,000 for each breach and be taken to employment tribunals by junior doctors.
The British Medical Association (BMA) said it would fully back doctors who were still being forced to work longer hours than set out by the directive.
Simon Eccles, chairman of the BMA's junior doctors' committee, said: "This is health and safety legislation - it's being introduced to protect patients as well as doctors, and hospitals need to take it seriously.
"Where the directive is flouted, the BMA will provide doctors with information, advice and, where appropriate, legal support."
Each time a hospital breaches the directive for individual doctors it will be liable for fines of up to £5,000 from the Health and Safety Executive. It could also be taken to employment tribunals by doctors who find themselves still working longer hours.
Surveys have suggested that many hospitals are struggling to meet the August 1 deadline to implement the directive. Research by managers' organisation the NHS Confederation last month showed that a sixth of trusts did not expect to be compliant with the directive by this Sunday.
The BMA said it was also ready to "name and shame" NHS trusts which allowed the new limits to reduce the quality of training received by junior doctors.
Some hospitals have used the opportunity to cut hours to introduce fresh approaches to working patterns that had driven up standards, the BMA said. But the majority of hospital have simply brought in shift systems which require doctors to work for stretches of up to 13 hours.
The BMA said that when these systems were used to staff hospitals at night junior doctors were often denied exposure to work that increases their knowledge.
Mr Eccles added: "We shouldn't forget that junior doctors are in hospitals to learn as well as look after patients. Safe hours must not mean unsafe training."
The directive also sets new minimum rest requirements for doctors in training. From 2009, junior doctors' hours will fall to 48 a week under the directive.
Beverly Malone, general secretary of the Royal College of Nursing, said: "The RCN is calling on all trusts to put nurses at the heart of the solution in providing continuous patient care. Evidence from the NHS Confederation survey shows that one third of acute trusts are not ready to implement the European working time directive.
"We believe that expanding nursing roles offer a better way in safeguarding patient care."
Dr Malone added: "The gap between the traditional roles of doctors and nurses is narrowing. Doctors and nurses are working together as equals, in a multidisciplinary team, to suit the needs of the patients.
"Today, advanced experienced nurses are performing anaesthesia, working as first assistants in theatres and nurse practitioners operate as senior house officers, providing continuous patient care."