It will be “months” before the coronavirus hits its peak in the UK, experts have told the government, as an action plan was agreed.

Ministers are working on the assumption that the outbreak will continue to worsen into the summer, despite hopes that warmer temperatures would curb its spread.

Emergency legislation will not be put in place until the end of March, because the government does not believe it will be “required” until then.

“You are talking about months rather than weeks before you reach the peak of this,” a government source told The Independent.

The legislation to give the government extra powers to help control the spread of the virus will be published next week, but will take several further weeks to clear parliament.

It is likely to include the power to cancel large public events or restrict travel in and out of areas with large numbers of cases, the health secretary has hinted.

However, the source said: “We don't want to have to take decisions before we have to. As much as possible we want people to carry on with their daily lives.”

The timescale emerged as Boris Johnson sought to prepare the public for the situation deteriorating, ahead of the action plan being published on Tuesday, and as the number of people infected climbed to 40,

The four new cases – among people from Hertfordshire, south Devon and Kent –had all travelled recently to Italy, which is experiencing the biggest outbreak in Europe.

Coronavirus: Streets around world left empty Show all 10 1 /10 Coronavirus: Streets around world left empty Coronavirus: Streets around world left empty A man wearing a face mask crosses a road in Wuhan, the epicentre of the novel coronavirus outbreak. Reuters Coronavirus: Streets around world left empty A view of the empty entrance to the UniversitÃ Cattolica (Catholic University) in Milan, northern Italy, on 24 February, 2020. EPA Coronavirus: Streets around world left empty Empty streets in Daegu, South Korea, on 23 February, 2020. EPA Coronavirus: Streets around world left empty Empty streets in Daegu, South Korea, on 23 February 2020. EPA Coronavirus: Streets around world left empty A lone sanitation worker sits near the closed Hankou Railway Station in Wuhan, Hubei province, China, on February 24, 2020. Reuters Coronavirus: Streets around world left empty A view of a deserted street in Codogno, northern Italy, on February 23, 2020. EPA Coronavirus: Streets around world left empty Italian police officers set a road block in Codogno, Northern Italy, on Monday, Feb. 24, 2020. AP Coronavirus: Streets around world left empty A supermarket closed in Codogno, one the northern Italian towns placed under lockdown, on February 23, 2020. EPA Coronavirus: Streets around world left empty A lone cyclist wearing sanitary masks pedals in the center of Codogno, Northern Italy. LaPresse via AP Coronavirus: Streets around world left empty An empty road at the entrance of the small Italian town of Codogno on February 23, 2020. AFP via Getty

“We have also agreed a plan so that if and when it starts to spread, as I'm afraid it looks likely it will, we are in a position to take the steps necessary to contain the spread of the disease as far as we can, and to protect the most vulnerable,” the prime minister said.

Mr Johnson said closing schools and banning mass gatherings would only be taken on scientific advice, adding: “The most important thing for people to understand is that [measures] will be guided by scientific advice.

“All four nations of the UK and the chief medical officers are involved in this and they will be helping us to take key decisions on when and how to take protective steps.

“We cannot forget that the single most useful thing that we can all do to support the NHS is to wash our hands, two times to Happy Birthday, with hot water.”

Earlier, Professor Paul Cosford, medical director of Public Health England, warned that widespread transmission of coronavirus in the UK has become much more likely as not all cases could be traced to overseas.

“At the moment, the vast majority of cases we see in the UK are still linked to countries where there is more widespread infection, either in Italy or South East Asia,” he said.

"It is true to say there is a small number now where it is much more difficult to find that link, and that is leading us to think we may well see more widespread infection in the UK fairly soon.

“It could happen in the next few days or it could take a little longer.”