The European Court of Justice has rejected a claim that the Government breached European law by forcing non-consultant hospital doctors to work excessive hours.

The court found that the European Commission had not succeeded in establishing that Ireland had failed to fulfil its obligations under the Working Time Directive NCHDs.

The Working Time Directive sets down rules for working hours and rest periods, the key provision being that the working week must not exceed 48 hours.

However, individual states are allowed to set down certain parameters for how those rules are applied.

The Irish Medical Organisation had argued that despite the intention to move towards compliance, the HSE's work practices for the doctors breached the directive, as many still had to work excessive hours.

In 2013 it set up a "24NoMore" campaign to oppose the long working hours, and even went on strike for a day.

Despite reaching an agreement with the HSE to move towards compliance, the IMO says almost 200 doctors are still working in excess of 24 hours, 30% are still working beyond the 48 hour weekly limit, and a third of hospitals continue to impose excessive working hours.

The European Commission had taken Ireland to the ECJ on the basis that the Government was in breach of the directive, arguing that training hours should not be considered working time.

However, the European Court of Justice dismissed the Commission's case.

The court said the Commission had not proven that doctors were able to treat patients during their training, nor that they were required to be physically present at a place determined by the employer and at the employers disposal to provide appropriate services as the need arose.

In addition, the court found that the Standard Contract of Employment between the HSE and the doctors did not prescribe a training requirement, and did not impose specific employment obligations in relation to training.

The judgment also dismissed the Commission's concerns about the extension of the reference period for the calculation of doctors' working hours.

It noted that Ireland had put forward the need to roster non-consultant hospital doctors sufficiently and flexibly as an objective reason for the arrangements.

The Irish Medical Organisation said it was disappointed with the ECJ decision, but would continue to fight for implementation of an agreement on working hours.

In a statement, it said the judgment did not affect the collective agreement reached between the IMO and the HSE on the implementation of legal and safe working hours for NCHDs.

IMO Vice President Dr John Duddy said this was not just an issue for doctors, as long working hours have an adverse effect on patient safety, and were contributing to Irish doctors leaving to work abroad.