The way a council awarded its chief executive a £27,000 pay rise was "unlawful on a number of grounds," a spending watchdog has ruled.
Caerphilly council did not advertise a meeting to decide the salary of Anthony O'Sullivan and other senior officers.
The Wales Audit Office (WAO) said there was no adequate record because the meeting's minutes were very brief.
A Welsh government minister will assess what action Caerphilly will now take. The council is considering the report.
Trade union Unison supported the findings and called for a review of all chief officers' pay in the public sector.
Mr O'Sullivan's pay grade was initially increased from a maximum of £131,000 to £158,000.
A special committee of Caerphilly council set the pay of senior officials in September 2012.
The committee approved recommendations in a report that was written by the chief executive himself, even though he was a direct beneficiary of the decision and gave advice when he had a pecuniary - or financial - interest.
The WAO said his report highlighted the risk that the authority would lose officers "due to, what were viewed in the report, as the current uncompetitive pay arrangements".
Mr O'Sullivan and other senior officers were present when the committee met and did not declare an interest or leave the room when decisions were taken.
Assistant auditor general Anthony Barrett said: "I have concluded that the decision by the senior remuneration committee on 5 September 2012 to approve the pay structure set out in the report of the chief executive was unlawful on a number of grounds."
Mr Barrett told Good Morning Wales: "We became concerned following some media coverage and also some correspondence, so we took a look at this and what we found was that the decision taken by the remuneration committee was actually unlawful.
"Firstly, the meeting of the committee wasn't advertised - that's required by legislation.
"The agenda for the meeting wasn't made available to the public for inspection. That's also required by the legislation, and there's also requirements in terms of how meetings are conducted that people with a pecuniary interest in the outcome of the meeting have to declare an interest and should really absent themselves from the meeting while those items are discussed.
"That didn't happen in this case which made the decision of the committee unlawful."
Mr Barratt said there was no evidence that the committee tried to pass the pay rise "on a nod and a wink". The pay rise was noted by the full council in October, but information about changes to pay grades was not available to councillors.
It led to protests by staff and trade unions, and an apology by Labour councillors on the authority.
Caerphilly is planning to make cuts of more than £5m this year while staff are on a three-year pay freeze.
The council reversed the decision in January and cut Mr O'Sullivan's pay rise from £27,000 to £5,000. As a result, the WAO said it had decided not to seek a court ruling.
However, it said there were a number of lessons for the council to learn and recommended a review of its procedure for advertising meetings. The council blamed the failure to advertise the pay scales meeting on human error.
A council spokesman said: "We are currently reviewing the recommendations contained in the report.
"It is important to stress that the decision of the senior remuneration committee was rescinded at a meeting of full council on 17 January, where independent external legal advice was received and a new decision was reached.
"The Wales Audit Office report will be considered at a meeting of full council in due course, so it would be inappropriate to comment further at this stage."
The Welsh government said: "It is entirely right that the Wales Audit Office should look into this in the public interest.
"We expect all public bodies to justify and account for decisions to increase senior pay effectively and an important part of that is following the proper procedures in making such decisions.
"The public should be able to see that decisions of this magnitude are taken in a transparent way and are subject to proper scrutiny.
"It is totally out of keeping with these principles for any such decisions to appear to be taken 'behind closed doors ."
Gary Enright, Unison Caerphilly branch secretary, said: "Unison has always argued that the decision to award such lucrative pay awards to the Caerphilly council's chief executive officers was immoral, insensitive and unjustified.
"This Wales Audit Office report has validated Unison's position and has confirmed that the decision was unlawful."
Colin Mann, leader of the Plaid Cymru group on Caerphilly council, said: "The auditor's damning dossier makes the position of the chief executive untenable."
Conservative local government spokeswoman Janet Finch-Saunders said: "There are major lessons to be learnt, which should be shared with all local authorities to ensure no such scandal can happen again."
Liberal Democrat AM Peter Black said there was "absolutely no justification" for the pay rise.
In a report published on Wednesday, the WAO also makes recommendations about keeping detailed records of meetings and improving guidelines on declaring an interest at meetings.