Thirty-six patients died and almost 2,000 suffered "moderate or severe harm" as a result of errors in the drugs prescribed and dispensed in hospitals, an official report has disclosed.

The blunders were among more than 41,000 "medication errors" recorded by all 173 NHS trusts in England between July 2005 and July 2006. The Healthcare Commission, the NHS regulator that published the figures, said hospitals had to do more to improve their handling of medicines.

In a league table of performance it ranked 18 trusts as "excellent" and 12 as "weak." The remainder were good or fair.

The National Patient Safety Agency, which collected the figures, said 80 per cent caused no harm to patients and 15 per cent caused "low harm." The remaining 5 per cent - 2,000 errors - caused moderate or severe harm.

"Our data shows that there were 36 deaths where medication mistakes were thought to play a part, though it should be understood that some of these patients were already very poorly and should be put in the context of the one million people who are seen by the NHS every day," the agency said.

A spokeswoman said there were no details of the patients who had been harmed or died.

"A typical case would be someone prescribed Warfarin, the blood thinning drug, for heart disease who was given a second drug without being asked what he was already taking. The interaction might cause a bleed which would be severe," she said.

Trusts listed as excellent included Airedale NHS Trust and Barnsley Hospital NHS Foundation Trust, both in Yorkshire, and Guy's and St Thomas's NHS Foundation Trust in London. Those listed as weak included South Warwickshire General Hospitals NHS Trust and the Royal Cornwall Hospitals NHS Trust.