Hopes of avoiding a staffing crisis in Britain's hospitals next year were dashed yesterday when the European Court ruled that the time junior doctors spend on call at their place of work should count as standard working time - even when they are asleep.

The ruling, in a case brought by a German casualty doctor, Norbert Jaeger, means the NHS cannot escape the full impact of the European working time directive which comes into force in August 2004.

The rule sets a maximum average working week of 58 hours for junior doctors. Meeting it was made much more difficult by a ruling of the European Court in 2000, known as the Simap (Systeme d'Information pour les Marches Publics) judgment, which said junior doctors sleeping overnight in a hospital must be counted as on duty.

The ruling was tested by Dr Jaeger, after his employer only counted the time he was awake as full working hours. The court decided that a doctor on call at a hospital was "subject to appreciably greater constraints than a doctor on stand-by".

The decision is a blow to ministers' hopes of overturning Simap's ruling. Britain's doctor shortage is among the worst in Europe and the Royal College of Physicians warned that there would need to be a 50 to 100 per cent increase in the number of doctors to meet the new limit. It said full compliance with the directive could lead to "a collapse of acute hospital services" with "profound implications for ... safe acute hospital services".