Drug firms Pfizer and Flynn Pharma have been fined nearly £90 million for "excessive and unfair" pricing to the NHS after hiking the cost of an anti-epilepsy drug by up to 2,600% overnight.

The Competition and Markets Authority (CMA) said drug maker Pfizer and distributor Flynn Pharma broke competition law when they increased the cost of a medicine used by around 48,000 patients in the UK.

The watchdog said their moves saw the cost to the NHS of phenytoin sodium capsules rocket from around £2 million a year in 2012 to about £50 million in 2013 - far more than Pfizer was charging in any other European country.

Pfizer was handed a record £84.2 million fine, while Flynn Pharma was fined £5.2 million.

The CMA has also ordered both firms to reduce their prices for the anti-epilepsy drug.

The CMA said that before September 2012, Pfizer made and sold phenytoin sodium capsules to UK wholesalers and pharmacies under the brand name Epanutin and the prices of the drug were regulated.

But Pfizer sold the UK distribution rights for Epanutin to Flynn Pharma in September 2012, which then saw the drug de-branded - or made generic - meaning that it was no longer subject to price regulation.

Both firms then each ramped up the price of the drug, meaning that overnight the NHS saw the cost surge by between 2,300% and 2,600%, according to the CMA.

It said the NHS at one stage saw the price of 100mg packs of the drug jump from £2.83 to £67.50.

The NHS had no alternative but to pay, as epilepsy patients who are already taking phenytoin sodium capsules should not usually be switched to other products due to the risk of loss of seizure control.

Philip Marsden, chairman of the case decision group for the CMA's investigation, said: "The companies deliberately exploited the opportunity offered by de-branding to hike up the price for a drug which is relied upon by many thousands of patients.

"These extraordinary price rises have cost the NHS and the taxpayer tens of millions of pounds."

He added: "This is the highest fine the CMA has imposed and it sends out a clear message to the sector that we are determined to crack down on such behaviour and to protect customers, including the NHS, and taxpayers from being exploited."