Boris Johnson has said the government will fully accept the findings of a report on failings in the Grenfell Tower disaster, promising survivors and relatives that “the truth will out and justice will be done”.

Responding to the report by the inquiry chairman, Sir Martin Moore-Bick, on the causes of the blaze at the west London block in June 2017 that killed 72 people, the prime minister opened a Commons debate by promising a rapid official response.

“I can confirm that where Sir Martin recommends responsibility for fire safety be taken on by central government, we will legislate accordingly,” he told MPs. “And more widely, we plan to accept in principle all of the recommendations that Sir Martin makes of central government.”

Watched by relatives, survivors and campaigners from the public gallery, Johnson said he would “not allow the lessons of this tragedy to fall through the cracks”.

He said: “The night of 14 June was a horrendous night. But in the darkness we have also seen the best of humanity: the residents who sacrificed their own lives to save their children or neighbours; the local community that rallied round in such an incredible fashion, holding the survivors in a tight embrace as the authorities failed to step up.”

Paying tribute to the Grenfell community, he added: “To them I say once again that the truth will out and justice will be done, and that Grenfell Tower and the people who called it home will never be forgotten.”

Responding for Labour, Jeremy Corbyn called the fire “an avoidable tragedy”. He condemned the government’s response as “too slow and too weak on every front”, including on rehousing survivors and replacing flammable cladding on other buildings.

Moore-Bick called for urgent action by the government to improve safety in high-rise blocks. Grenfell United, which represents hundreds of affected members of the community, condemned what it called systemic failings that had left the London fire brigade unable to cope with a cladding fire and evacuation.

The Labour MP David Lammy, who lost a friend, Khadija Saye, in the fire, intervened during Johnson’s statement to ask about action to remove flammable cladding elsewhere.

Play Video 2:27 Jeremy Corbyn: Grenfell tower fire was an 'avoidable tragedy' – video

“It is still the case that there are men, women and children up and down the country sleeping tonight in buildings with that cladding,” he said. “So many years after the tragedy, does he not think, in this sixth richest democracy in the world, we could not have done more to get rid of people sleeping in infernos across our country.”

Johnson replied: “All I can say is that he is quite right. We cannot afford to wait for the full conclusions of the report.”

The prime minister said relatives would be most concerned about the issue of Grenfell occupants being told to remain in their homes even when the fire was clearly out of control.

“The so-called stay put policy is the bedrock on which all plans for fighting fires in tall residential buildings are based. Building regulations are supposed to mean that fires cannot spread beyond individual flats and that they are compartmented,” he said. “When that is the case, it is indeed safest for most residents to stay in their homes until the fire is extinguished, but at Grenfell that was not the case.”

Grenfell Tower inquiry: the chair's findings so far Read more

Paying tribute to campaigners, Johnson said he hoped the report’s findings and Commons debate would “bring some measure of comfort to those who suffered so much”.

He said: “They asked for the truth, we promised them the truth, we owe them the truth. And today the whole country, the whole world, is finally hearing the truth about what happened at Grenfell Tower.”

Corbyn said it was disgraceful that there had been no formal review of the stay put policy. “The government’s response has been inadequate, uncaring and frankly insulting,” he said. “Grenfell Tower would not have happened to wealthy Londoners. It happened to poor and mainly migrant Londoners.”

He added: “Grenfell must never happen again. It happened because of the negligence and recklessness of a Conservative government, a Conservative council and a Conservative mayor of London.

“The night of 14 June 2017 will never be forgotten, but just as importantly it must never happen again. The shameful fact that this government has dragged its feet – that the exact same cladding is on similar high-rise blocks, that sprinklers have not been fitted, that thousands of people will go to bed tonight and tomorrow night not feeling safe – should shame this government.”