The EU ombudsman has given a damning verdict on the way Jean-Claude Juncker's chief of staff was given the top post in the bloc's civil service.
The promotion of Martin Selmayr, nicknamed "the monster" by his boss, was fast-tracked in February, in a move condemned by one Euro MP as a "coup".
Ombudsman Emily O'Reilly identified four counts of maladministration by the European Commission.
She said the affair had damaged public trust in EU institutions.
Ms O'Reilly agreed with the European Parliament's assessment that the promotion had "stretched and possibly even overstretched the limits of the law".
However, her report will not affect his promotion. She calls only for the top job to have an appointment procedure separate from that for other senior posts.
Who is Martin Selmayr?
A lawyer originally from the German city of Bonn, he has worked for the Commission since 2004, but really came to the fore in 2014 when he was picked by Mr Juncker, then the new president of the European Commission, as his chief of staff.
He masterminded Mr Juncker's campaign for the presidency, and has since been described as the most powerful man in Brussels and the "Frank Underwood" of the Commission, in a reference to the House of Cards political thriller.
In 2017, there were reports that he had leaked details of a confidential Brexit dinner meeting between Theresa May and Mr Juncker. German newspaper FAZ said Mr Juncker had left "ten times more sceptical than before".
Mr Selmayr has been in charge of the 32,000-strong EU bureaucracy since 1 March. One widely-circulated joke in Brussels about his alleged self-importance runs: "What's the difference between God and Selmayr? God knows he's not Selmayr."
How was Selmayr promoted?
It all happened in the space of a dizzying few minutes at a meeting of European commissioners on 21 February.
Mr Selmayr was appointed deputy secretary-general and the existing top civil servant, Alexander Italianer, suddenly announced he was retiring.
Without being promoted to the deputy's post first, Mr Selmayr could not have been given the top job. The only other candidate for deputy had conveniently pulled out the day before.
Mr Juncker then said his chief of staff should get the top job and he was duly appointed.
The European Parliament condemned the handling of the promotion, and there were reports that Mr Juncker had threatened to quit if the newly appointed secretary-general was forced out.
What does the ombudsman say?
In her scathing report, Emily O'Reilly pointed to several "issues of concern":
- Mr Selmayr had not "recused himself" from decision-making that led to the deputy vacancy that he ultimately filled
- The appointment procedure for the deputy role was carried out "to make Mr Selmayr eligible for his immediate reassignment as the new secretary-general"
- The Commission reacted to valid concerns in an "evasive, defensive and legalistic manner".
She cited four instances of maladministration, including failing to avoid risking a conflict of interests, and warned that the sequence of events had placed the "wider legitimacy of the EU... at unnecessary risk".
The European Commission said it did not share all aspects of the report, but welcomed her decision not to contest the legality of the appointment.