Boris Johnson’s former adviser on ministerial standards was prevented from interviewing a key witness for his formal bullying inquiry into Priti Patel.

Legal and Whitehall sources have revealed that Sir Alex Allan sought to interview the former top Home Office civil servant Sir Philip Rutnam about his dealings with Patel, but was blocked by government officials.

Allan’s bullying inquiry was launched by the prime minister following the resignation of Rutnam over’s Patel’s alleged behaviour and he is suing the government for constructive dismissal. Sources say Allan was informed he could not interview Rutnam for his independent inquiry because of the legal action.

Allan, however, felt that his inquiry was being denied potentially crucial evidence. The inability of the prime minister’s former ethics adviser to question Rutnam also prompted a “spirited row” within the government’s legal department.

Even so, he uncovered sufficient material to conclude that Patel had broken the code governing ministers’ behaviour.

On Friday Allan resigned after the prime minister took the unprecedented step of exonerating Patel, who has refused to resign.