Boris Johnson has sought to claim the credit for removing the disgraced former health secretary Matt Hancock, despite Downing Street repeatedly saying on Friday he “considered the matter closed”. Asked by reporters whether Hancock’s relationship with the Department of Health board member Gina Coladangelo had undermined public health messaging, Johnson said: “That’s right, and that’s why when I saw the story on Friday we had a new secretary of state for health in on Saturday.” He was speaking on a visit to Batley and Spen, the West Yorkshire constituency where a byelection will be held on Thursday. Conservative MPs were baffled on Friday about why the prime minister had not already demanded Hancock’s resignation, with many contacting their whips to warn that their constituents were angry about the issue. Some backbenchers had compared the wave of fury among voters to the outpouring that followed Dominic Cummings’s lockdown-busting trip to Durham. Despite Johnson’s remarks appearing to suggest he had removed Hancock, his official spokesperson conceded on Monday that had not been the case, and Hancock had voluntarily resigned. “The health secretary offered his resignation, he discussed it with the prime minister and he agreed it was the right decision,” the spokesperson said. Asked why it was not deemed the right decision on Friday, he said: “They discussed the issue further on Saturday, and the prime minister accepted his resignation and agreed it was the right thing to do.” He added: “You’ve seen the actions that the prime minister took.” Asked what those actions had been, he cited Johnson’s appointment of Sajid Javid as health secretary. The prime minister met Hancock on Saturday at his country residence, Chequers. He had previously defended the health secretary, after images emerged of Hancock kissing Coladangelo, a longtime friend who had been brought into the department as a non-executive director. Hancock tried to ride out the storm of publicity on Friday morning, after pictures of him in a clinch with Coladangelo on 6 May, when people were still being advised not to hug, were splashed across the Sun newspaper. He issued an apology for breaking lockdown rules and asked for “privacy” to deal with a “personal matter” – but failed to address the issue of how and why Coladangelo had been hired as a non-executive director, a position in which she was meant to provide independent oversight of the department. Labour’s deputy leader, Angela Rayner, said: “Boris Johnson is trying to rewrite history because he didn’t have the guts to sack Matt Hancock.” She added: “A fish rots from the head down, and by failing to sack the former health secretary, Johnson proved he doesn’t have the leadership qualities or judgement required to be prime minister.” Cummings waded into the row on Twitter on Monday, recalling his comparison of Johnson with an out-of-control shopping trolley. He suggested that the prime minister may have changed his position after being bombarded with embarrassing headlines and messages from his wife, Carrie. He said Johnson’s response on Saturday had been “SMASH: Arghhh Matt go now you’ll be back better stronger shortly matey forward to victory!” before then claiming credit for his departure on Monday. Briefing journalists on Friday lunchtime, more than 12 hours after the story broke, Johnson’s spokesperson repeatedly sidestepped the question of why Hancock had not been dismissed. “You’ve seen the health secretary’s statement, so I would point you to that,” he said. “I don’t really have anything further to add. The health secretary set out that he accepted he had breached the social distancing guidelines and he has apologised for that. “The prime minister has accepted the health secretary’s apology and considers the matter closed.” Hancock’s resignation statement, published on Saturday evening, suggested he had made his own decision to leave his post. In his letter to the prime minister, Hancock said: “I am writing to resign as secretary of state for health and social care. We have worked so hard as a country to fight the pandemic. The last thing I would want is for my private life to distract attention from the single-minded focus that is leading us out of this crisis.”