G4S has finally pulled out of bidding for a renewal of a controversial electronic tagging contract for criminals in England and Wales, after it was accused of overcharging the government for years.

Both G4S and Serco were accused by Justice Secretary Chris Grayling of overcharging and said it has cost the taxpayer tens of millions of pounds.

Following the accusations Serco pulled out of bidding for the renewal and welcomed an investigation, whilst G4S persisted with going for the contract.

However, it has since backtracked and said that it is "committed to resolving the contractual issues raised by the Ministry of Justice in connection with historical billing on the electronic monitoring contracts".

G4S is no stranger to controversy, after a failure in an internal computer system was the primary reason it was not able to provide a sufficient number of security staff to support the London 2012 Olympic Games this summer.

Mr Grayling told the BBC: "I made it clear last month that I wanted G4S to withdraw from the competition for the new electronic monitoring contract. They refused to do so then.

"I'm glad they have decided to withdraw now. We can now get on with awarding that contract, which will improve the monitoring of offenders and deliver savings for the taxpayer."

John O'Brien, research director at analyst house TechMarketView, said that he is surprised it took G4S so long to pull out of the procurement process.

"What's surprising is why it has taken G4S four weeks for the penny to drop, and finally withdraw from the renewal process. Justice Secretary Chris Grayling has said that he wouldn't sign any new contracts with G4S until the process had concluded satisfactorily," he said.

"Given the seriousness of the allegations, it seems inconceivable that G4S could have stood a chance at securing the renewal anyway."