Media playback is unsupported on your device
Boris Johnson has for the first time committed to an "independent inquiry" into the coronavirus pandemic.
The prime minister said it was not right to devote "huge amounts of official time" to an inquiry when the UK is "in the middle" of a pandemic.
But he said the government would seek to learn lessons "in the future" and "certainly we will have an independent inquiry in to what happened".
He was responding to a question from acting Lib Dem leader Sir Ed Davey.
The prime minister has repeatedly rejected opposition calls for an inquiry into the government's handling of the coronavirus pandemic.
At Prime Minister's Questions, Sir Ed said: "Under this PM we suffered one of the worst death rates in the world and Europe's worst death rate for health and care workers.
"Previously he's refused my demand for an immediate independent inquiry, saying it's too soon, even though back in 2003 he voted for an independent inquiry into the Iraq war just months after that conflict had started.
"If he still rejects an immediate inquiry, will he instead commit in principle to a future public inquiry?"
The prime minister committed to an independent inquiry, but did not mention a public inquiry, which would involve public hearings and witnesses giving evidence under oath, in his reply.
This is quite a significant moment.
We know from past inquiries, like the Iraq inquiry or the Leveson inquiry into the media, that they can shape the reputations of the most powerful and probe their innermost thinking in moments of crisis in a way that's often hard to do through the normal scrutiny of politicians and journalists.
But there are an awful lot of unanswered questions.
We still don't really know what the prime minister meant when he talked about an independent inquiry - that could be a full blown judge-led inquiry or it could be a much lower calibre investigation led by an academic or maybe a select committee.
We don't know the timeframe. The prime minister has indicated he does not think we should hold the inquiry while we're still grappling with coronavirus but that means it could be months, even years away if we're having to wait to actually eliminate the virus or get a vaccine.
We don't know the remit of the inquiry or the authority - will it be the sort of inquiry where witnesses are question under oath by barristers led by a judge?
My guess, and it is only a guess, is that it will have to be of similar stature and authority to the Iraq inquiry.
During PMQs, Labour leader Sir Keir Starmer pressed the prime minister on whether he had learned the lessons of a report this week, which warned about 120,000 new coronavirus deaths in a second wave of infections this winter.
"One of the key recommendations in this report commissioned by the government's office for science, is that testing and tracing capacity will need to be significantly expanded to cope with increased demands over the winter," said Sir Keir
"The reality is this - trace and track is not working as promised as it stands today."
The Labour leader questioned whether the prime minister had even read the scientists' report.
Mr Johnson said he was "aware of the report" but accused the Labour leader of "endlessly knocking the confidence of the people in this country" with criticism of the government's approach.
"Once again he attacks the test and trace operation which is working at absolutely unprecedented scale," Mr Johnson told MPs.
He added: "Our test and trace system is as good as or better than any other system in the world and yes, it will play a vital part in ensuring that we do not have a second spike this winter."
Sir Keir said it was "perfectly possible to support track and trace and point out the problems".
He told the PM that "standing up every week and saying it's a 'stunning success' is kidding no-one - that's not giving people confidence in the system".
"They'd like a prime minister who stands up and says 'there are problems and this is what I'm going to do about them'. Not this rhetoric about 'stunning success' when it's obviously not true," he added.
Mr Johnson accused the Labour leader of constantly switching from supporting the government to attacking it, with a swipe at Sir Keir's former profession as a lawyer.
"He needs to make up his mind about which brief he's going to take today because at the moment he's got more briefs than Calvin Klein."