Boris Johnson caught the coronavirus because he failed to obey the social-distancing rules currently being observed across the country, a scientist has claimed. 

The Prime Minister and Health Secretary Matt Hancock have both confirmed they have tested positive for coronavirus, while the UK chief medical officer Professor Chris Whitty is self-isolating after displaying symptoms.

Mr Johnson and Mr Hancock have vowed to continue leading the country’s Covid-19 response while remaining quarantined at their homes, with the PM’s residence at Number 11 Downing Street shut off to visitors.

Professor Susan Michie, director of University College London’s centre for behaviour change, said it did not come as a surprise that the PM and his closest advisers had contracted the illness and accused the Conservative Party leader of failing to follow his own advice.

“Whilst the PM was telling people to stay at home and keep at least two metres apart from each other, the House of Commons was open for business and face-to-face parliamentary activities were carrying on,” she said.

“Given the transmission routes of touching contaminated surfaces and breathing in virus-laden droplets, it should not come as a surprise to hear that the PM and Health Secretary have tested positive for coronavirus.

“There are many reasons why those in leadership positions, including in Government, should practice what they preach.

“The first is that such people are important role models, with the ability to enhance or undermine their verbal messages by their actions.

“The second concerns trust: if leaders do not adhere to their own recommendations, this undermines trust in them which in turn can undermine the population’s adherence to their advice.”

But Cabinet Office minister Michael Gove came to the defence of the PM and said his illness demonstrated that the virus “does not discriminate”.

The Chancellor of the Duchy of Lancaster told a press conference in Downing Street: “The fact that the virus is no respecter of individuals, whoever they are, is one of the reasons why we do need to have strict social distancing measures so that we can reduce the rate of infection and reduce the pressure on the NHS.”

Devi Sridhar, professor of global public health at the University of Edinburgh, said the news of the PM’s illness should not distract from the wider questions that need answering on the pandemic.

“I fear the PM news today will swamp headlines and distract from core issues,” he said.

“We need governments to present clear strategy with deadlines attached for next few weeks. What is the concrete plan for testing? What is the plan for personal protective equipment for health workers?

“What is the status of ventilators? How is progress on antiviral and vaccine research going? What will the next six months look like and what is the medium-term planning taking place? These are the questions to keep asking.”

NHS chief executive Sir Simon Stevens announced on Friday that testing for front line health workers would start next week, while Mr Johnson has followed up with a host of manufacturing companies on the progress in producing more ventilators during a telephone conference call on Thursday.