A report said Mr O'Sullivan was "grossly negligent", though he insists he has "nothing to apologise for".

Experts say the row is the longest-running disciplinary case of its kind in local government that they can remember.

It centred on claims that Mr O'Sullivan, his deputy Nigel Barnett and head of legal services Daniel Perkins authorised a 20 per cent pay rise for senior officers in 2012, while most other staff had a pay freeze.

Criminal charges were dropped in 2015 and the two other men agreed payouts worth £300,000 between them.

But no agreement was made with Mr O'Sullivan and he was put on special leave, continuing to receive his salary.

Barbara Jones, the council's interim leader, said: "We regret the amount of time and money that has been spent on this matter, but we had no choice other than to follow the agreed statutory process.

"It should also be noted that during this time we had to allow criminal investigations to proceed, which added almost two-and-a-half years to the overall timeframe."

Jess Turner, of the union Unison Cymru, said the saga should have been sorted "years ago".

She said: "Staff are absolutely sick of it and the council needs to move on. "Since 2010, severe spending cuts driven from Westminster have cost the jobs of 746 Caerphilly council workers, yet as much as £6m pounds has been ploughed into a single issue."

Caerphilly AM Hefin David said he was "relieved that the saga is over" but it had taken "too long to get to this point".