Boris Johnson announced on Wednesday that a statutory inquiry into the UK’s handling of the coronavirus pandemic will begin in spring 2022 with powers to compel witnesses to give evidence and provide documents.

The prime minister told MPs that a comprehensive examination would begin after the government was certain that the UK had passed the worst of the pandemic. Johnson noted that a rise in Covid-19 infections was possible this winter and that would put pressure on the NHS.

Johnson told the House of Commons: “Amid such tragedy, the state has an obligation to examine its actions as rigorously and candidly as possible and to learn every lesson for the future.”

He added that the inquiry would put “the state’s actions under the microscope” and the government was “fully committed to learning lessons at every stage of this crisis”.Some of the themes covered in the inquiry are likely to include the introduction of nationwide lockdowns in March and November last year; the preparedness of the NHS; procurement of vital equipment; the effectiveness of the Test and Trace system; and whether borders should have been closed sooner.

The prime minister said the inquiry would place a significant time burden on the NHS, the government and its advisers, meaning that the process could not begin until the worst of the pandemic was passed.

“Our own scientific advisers judge that although more positive data is coming in and the outlook is improving, there could still be another resurgence in hospitalisations and deaths,” he said. “There is in any case a high likelihood of a surge this winter when the weather assists the transmission of all respiratory diseases.”

Given the length of such public inquiries, such as the Chilcot inquiry into the Iraq war, it is unlikely to report back before the next general election, due by 2024 at the latest.

Sir Keir Starmer, Labour leader, welcomed the announcement of the inquiry and said his party would “play whatever role to make this work well”. But the opposition leader criticised the timing.

“The principle is that the inquiry should be as soon as possible, as soon as possible. Now I understand that a statutory inquiry will take time to set up, but why can’t it be later this year? Why can’t it start earlier?”

Jo Goodman, co-founder of the Covid-19 Bereaved Families for Justice group, said the announcement of a statutory inquiry into the handling of the pandemic was a “huge relief” but added that spring 2022 was “simply too late to begin”.

The inquiry will be held under the 2005 Inquiry Act, which will give it legal powers for submission of evidence, including documents and messages, as well as compelling witnesses to give evidence. Johnson said the inquiry would work closely with the devolved administration in Scotland, Wales and Northern Ireland.

He did not, however, indicate who would lead it but insisted the process would be independent and thorough. “We owe it to the country to have as much transparency as we can. We owe it to the country to produce answers on a reasonable timescale.” The terms of reference will be defined before next spring.

Government insiders said Johnson’s decision to announce the inquiry was to “get ahead” of testimony by Dominic Cummings, the prime minister’s estranged former adviser, who is a witness at a House of Commons select committee hearing into the handling of the pandemic on May 26. “The PM wanted to show the initiative,” a Whitehall official said.

Cummings is expected to harshly criticise the prime minister for not taking the country into lockdowns sooner in March and November last year, which scientific advisers think led to thousands of excess deaths.