THE Whitehall official leading the inquiry into bullying allegations against Priti Patel has resigned after Boris Johnson over-ruled him and insisted the Home Secretary had not broken the ministerial code.

Sir Alex Allan said in the conclusion to his report that Ms Patel had not consistently met “the high standards required by the ministerial code of treating her civil servants with consideration and respect”.

He added that her approach on occasions had amounted to behaviour “that can be described as bullying in terms of the impact felt by individuals”.

And then added: “To that extent her behaviour has been in breach of the ministerial code, even if unintentionally.”

However, the Prime Minister ruled that his Cabinet colleague had not broken the ministerial code and insisted he had "full confidence" in her and that he “considers this matter now closed".

A Downing St spokesman said: "As the arbiter of the code, having considered Sir Alex’s advice and weighing up all the factors, the Prime Minister’s judgement is that the ministerial code was not breached."

Within minutes of the publication of Sir Alex’s conclusions and Mr Johnson’s response, the PM’s ethical standards investigator issued a statement, saying: “I recognise that it is for the Prime Minister to make a judgment on whether actions by a minister amount to a breach of the ministerial code.

“But I feel that it is right that I should now resign from my position as the Prime Minister’s independent adviser on the code.”

Later, Ms Patel issued her own statement, saying: “I am sorry that my behaviour in the past has upset people. It has never been my intention to cause upset to anyone. I am very grateful for the hard work of thousands of civil servants who help to deliver the Government’s agenda.

“I care deeply about delivering on the commitments we have made to the people of this country and I acknowledge that I am direct and have at times got frustrated.

“I would like to thank the Prime Minister for his support. The Permanent Secretary and I are working closely together to deliver on the vital job the Home Office has to do for the country.”

Matthew Rycroft, the Permanent Secretary at the Home Office, said: “Sir Alex Allan’s findings make difficult reading, including for the Civil Service.

“The Home Secretary and I are committed to working together to improve the Home Office and build the strongest possible partnership between ministers and officials based on support, candour, safety to challenge, mutual respect and professionalism. Relationships between ministers and officials have improved considerably.

“Day in day out Home Office staff work tirelessly to keep the public safe, cut crime, and improve our immigration and asylum system, and we are determined that they should do so in a supportive environment that respects their wellbeing.”

Ms Patel, 48, has strenuously denied any wrongdoing and while allies have described her as a “demanding” boss, they have insisted she is not a bully.

A Cabinet Office investigation was launched in March over allegations that Ms Patel belittled colleagues and clashed with senior officials in three different departments.

It followed the resignation of Sir Philip Rutnam, the Home Office’s Permanent Secretary,who accused Ms Patel of a “vicious and orchestrated briefing campaign” against him and is claiming constructive dismissal at an employment tribunal.