Hospital trusts are warning that new legislation to curb the notoriously long hours of trainee medics could lead to a shortage of junior doctors.

Working-time regulations limiting trainee doctors to a maximum 58-hour week came into effect yesterday as polls suggested about one in six trusts are not yet able to comply.

The European Working Time Directive, introduced in 1998, gave most workers the legal right not to work more than 48 hours a week. Junior doctors, who can work as many as 80 hours a week, were exempt because of the difficulty of cutting their hours so drastically.

The new rule is the first step in a staged reduction of doctors' hours which will eventually entitle them to a maximum 48-hour week by August 2009. The British Medical Association said last week it would support doctors who were forced to work more than the stipulated hours.

Hospitals who flout the directive face fines of up to £5,000. 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." The BMA has said it may "name and shame" hospitals which allow the new limits to affect the quality of doctors' training.

The new directive includes doctors' time when they are "on call" in their working hours, meaning that many hospitals have had to introduce shift systems, and exacerbating problems in areas that already suffer from shortages such as paediatrics and maternity care.

Research by the NHS Confederation last month revealed that about 16 per cent of hospital trusts would not be able to comply with the directive. Chris Atkinson, of the confederation, which represents hospital trusts, said: "Patients will benefit because doctors will be working fewer hours and will be less tired so standards of care should be increased."