The NHS could recover up to £500 million from one of the world’s largest pharmaceutical companies following a lengthy legal battle over the patent for one of its drugs.

The health service took the “unprecedented” step of issuing guidance to all GPs and pharmacists stating that when prescribing the drug pregabalin for neuropathic pain they should stipulate that it must be the brand Lyrica, produced by Pfizer.

The unusual directive was due to a 'second medical patent’ held by the company and meant the NHS had to reimburse pharmacists far more per capsule than a cheaper generic version of the same drug.

But a High Court ruling, backed by the Court of Appeal, found that Pfizer’s patent was not fully valid. The company disputed the decision and is awaiting a ruling from the Supreme Court.

A detailed study analysing the financial cost to the NHS of the protracted legal action, seen by the Sunday Telegraph, suggests that if the final appeal is unsuccessful, the NHS should be able to reclaim from Pfizer the money it would have saved by prescribing a cheaper version of the drug.

The research, which has been submitted to the BMJ Open for publication, said there was no clinical difference between Pfizer’s Lyrica and the generic version of the drug.