In a major u-turn, the prime minister vowed to fund councils and housing associations to remove combustible cladding from tower blocks after months of rows between town halls and the government over who would pay for the work.

The move comes ahead of a Commons debate on the issue, where Jeremy Corbyn's party was planning to challenge the government to act over scores of buildings still covered in cladding similar to the material found on the West London tower block, where 71 people died last June.

Responding to a question from Tory MP Bob Blackman, Ms May said: "On the issue of the safety of buildings, the fire and rescue services have visited over 1,250 high-rise buildings and immediate action has been taken to ensure the safety of every resident.

"Councils and housing associations must remove dangerous cladding quickly but paying for these works must not undermine their ability to do important maintenance and repair work."

She added: "I can today confirm that the government will fully fund the removal and replacement of dangerous cladding by councils and housing associations estimated at £400m and the housing secretary will set out further details later this week."

Struggling town hall leaders had warned the government that they would have to cut back on essential repairs and safety checks to pay for the work, but ministers repeatedly refused to set aside dedicated funding.

Ahead of the anniversary of the disaster next month, Labour was due to call for a complete overhaul of "discredited" building safety checks and controls in a parliamentary debate today.

Speaking ahead of the debate, shadow housing secretary John Healey said: "When Grenfell survivors and worried residents in other tower blocks should have seen action, they have had to suffer painfully slow progress and broken promises.

"What was a national disaster is now becoming a national disgrace."

The latest u-turn comes after Ms May dropped her opposition to requests from bereaved families to allow a diverse decision-making panel on the Grenfell Tower inquiry.

An extra two panel members will join the inquiry for its second stage, which will begin in December.