The UK didn't have the "exact measures" in place to deal with Covid, the ex-head of the civil service has said.
Lord Sedwill, who left his job last month, told the BBC there is "a genuine question" about whether the UK could have been "better prepared" for the pandemic.
He also said Dominic Cummings' journey to County Durham during lockdown had been a mistake.
And he admitted to feeling "troubled" by attacks on the civil service.
Lord Sedwill stepped down as the UK's top civil servant following reports of tensions between him and senior members of Boris Johnson's team.
In a wide-ranging interview with BBC political editor Laura Kuenssberg he also talked about the "ups and downs" of President Trump's leadership and the UK's relationship with Russia and China.
Reflecting on the government's handling of coronavirus, he said: "Although we had exercised and prepared for pandemic threats, we didn't have in place the exact measures, and we hadn't rehearsed the exact measures" for the challenge Covid-19 presented.
"I think there is a genuine question about whether we could have been better prepared in the first place and that is obviously a very legitimate challenge."
He said any future inquiry would have to look at whether decisions were taken at the right time, if the lockdown was imposed fast enough and what capabilities the state had to deploy to tackle the virus.
Lord Sedwill, who contracted the virus himself, said he was "really proud of a great deal that we did" including setting up the Nightingale Hospitals.
In May, the prime minister's chief adviser, Dominic Cummings, said he had acted "reasonably" when he drove to County Durham after his wife developed Covid-19 symptoms.
Asked about the incident Lord Sedwill said that "it was clearly a difficult moment for the government".
"It was a mistake - whether everyone should quit every time they make a mistake, I don't think is right.
"But it clearly undermined the government's coherent narrative about people following the rules."
In his first interview since leaving one of the biggest jobs in the country, the man who was paid to give quiet careful advice is diplomatic with his language, certainly, but clear nonetheless.
While he takes pride in some of the government's response to the pandemic, he said there is a genuine question about whether it could have been better prepared and admitted it lacked the "exact measures" for a disease of this kind.
The picture he gives of the heart of government in the most intense moments in the crisis is of a tense place, where ministers and officials were scrambling to keep up with a changing reality where the nation's health and economy were both genuinely in danger.
And frankly, with all the uncertainty of handling a new disease, no-one could be quite sure of the right thing to do.
For all that ministers have fumed privately, and hinted publicly, he is adamant that the government coped fairly well during a once in a generation crisis, not withstanding "genuine questions" about just how prepared the UK really was.
Lord Sedwill also said he was "troubled" by attacks on the civil service and that speculation about his own future had been "unpleasant".
Criticism of the civil service's integrity and capability was unfair, he said, while off-the-record briefings against senior civil servants, over Brexit and other issues, had been "damaging".
"It is damaging to good governance and those responsible should recognise the damage they're doing, even if they're indulging themselves in some short-term tactical ploy," he said.
He dismissed suggestions that the government's enthusiasm to reform the civil service had led to six civil servant heads stepping down, arguing that the truth was "more complex" than the departures being "part of a campaign".
"Governments want people they have confidence in, of course," he said.
"We go through periods of this kind when there's perceived to be an attack on the underlying values of the civil service but actually, those values and the institutions serving governments with impartiality have always prevailed and I'm confident they will continue to do so."
Commenting on the forthcoming US presidential election he said that while American politics is "pretty volatile" the UK-US relationship is "stable".
"President Trump is a very unusual occupant of that office in his personal style and the way he articulates the US position but the underlying alliance is based on much more than the individual relationships at the top.
"You have some ups and downs sometimes at the political level but the fundamentals are really strong in my view."
He praised the Trump administration for its diplomatic efforts in the Middle East.
He also warned that the UK mustn't be "naive" when dealing with Russia and China
"I think when we've allowed the rhetoric to suggest that countries with very different political systems, essentially authoritarian political systems, are edging towards our values and viewing the world, then we've probably been mistaken and have overstated the natural alignment," he said.