A ministerial aide was sacked on Thursday night after the Conservative chief whip sent out a letter with varied wording in a “canary trap” designed to catch whoever leaked it. Andrew Lewer, a Home Office parliamentary private secretary, was fired from his junior government role when a letter urging the recipients not to leak information to the press found its way into the hands of the Guido Fawkes website. But it is understood that the letter, from the chief whip, Mark Spencer, was worded slightly differently for each recipient so officials would be able to tell which version had reached the media. Lewer, PPS to the policing minister Kit Malthouse, denied he had leaked the letter when confronted by Conservative whips, but suggested it could have come from a member of his staff. He told the Politico website: “In nearly 20 years of elected office I have never leaked to the press.” The Guardian has approached Lewer for comment. The letter, sent to all PPSs and vice-chairs of the Conservative party, told recipients that “there seems to be a lack of clarity in what is expected of you in your position as Private Parliamentary Secretary or Vice Chair … I would like to take this opportunity to remind you of the severe consequences that you will face, should you choose to breach the [Ministerial] Code.” It went on to say that the prime minister’s foreword to the code “strictly prohibits ‘leaking’ or any other breaches of trust”. The letter was swiftly leaked to Guido Fawkes and published under the headline: “LEAKED: CHIEF WHIP WRITES TO PPS’S WARNING THEM NOT TO LEAK.” It is not clear which parts of the letter were varied in order to catch the leaker, but the entire text was published as part of the Guido Fawkes story. Ministers could not claim not to have been warned of the possibility of such a method being used to identify possible leakers. Last month, No 10 briefed that it could use a “canary trap” strategy in an attempt to identify the source of leaks. That ploy was viewed by some Westminster observers as unlikely to succeed given it had been announced to the press. Despite attempts by the former No 10 aide Dominic Cummings to crack down on leaking, with threats of the sack for any adviser who was found to have given information to the press, the government has so far been unable to clamp down on leaks since it won reelection. A Cabinet Office inquiry is under way to find the “chatty rat” who passed plans for the second lockdown to the press before they had been finalised.