The timing of the decision by key firms involved in choosing flammable materials for refurbishing Grenfell Tower to ask for immunity from prosecution is "highly questionable and highly reprehensible", the Grenfell inquiry has heard.
There were groans from survivors after a last-minute application was lodged to chairman Sir Martin Moore-Bick.
It was requested Sir Martin write to Attorney General Geoffrey Cox QC asking for an undertaking that would stop any evidence staff gave being used against them in any future criminal proceedings.
Scotland Yard is currently conducting its own investigation into gross negligence manslaughter, corporate manslaughter and health and safety offences and said in September it had so far completed 17 interviews.
The hearing heard that without the pledge many members of staff would refuse to answer questions by claiming privilege against self-incrimination.
The first phase of the Grenfell inquiry found the cladding on the tower did not comply with building regulations and was the "principal" reason for the rapid and "profoundly shocking" spread of the fire which killed 72 people.
The second phase of the inquiry into the blaze began on Monday with the inquiry's chief lawyer accusing companies of passing the blame on to each other rather than accept any responsibility.
On Tuesday the inquiry heard the main designers, contractors and fire safety consultants appeared to know two years before the disaster that a planned cladding system would fail if exposed to fire, according to internal emails disclosed.
On Wednesday the chairman of the inquiry, Sir Martin said he was asked to seek guarantees that "nothing said by a witness in answers to questions in the inquiry will be used in furtherance of a prosecution against them.
"Thereby giving them complete freedom to tell the truth without any concern for the future."
Michael Mansfield QC, representing victims, described the "timing of this application" as "highly reprehensible and highly questionable, coming on the eve of the evidence.
"There has been plenty of time for this to be considered," he added.
"We have a major question over why it has been done today.
"It has caused immense anxiety, distress and anger at a time which has come throughout a much longer period of waiting after this disaster, of waiting to get to the point of accountability, as it were, to be almost thwarted at the doors of the court."
Sir Martin agreed the "application has come very late in the day and at a most inconvenient time.
He added: "It’s very disappointing, I might even use a stronger word."
The Justice4Grenfell group branded the move "disgusting" and Unite the union said it would be a "mockery of justice" if it was granted.
Earlier in the inquiry Grenfell United, a group representing survivors of the fire and relatives of those killed, said they hoped inquiry would "expose" those who authorised the "devastating refurbishment" of the building's cladding between 2012 and 2016.
A spokesperson from the Attorney General's Office said no application had been received from Sir Martin yet.
The spokesperson added: "Should an application be received, it will be carefully considered in consultation with other relevant bodies as appropriate."
Sir Martin said he would hear the application for firms including external wall subcontractor Harley Facades, main contractor Rydon, and architects Studio E on Thursday afternoon.
The former appeal court judge told Mr Mansfield he would adjourn and then hear his representations regarding the matter on Monday morning.
Cross-examination was due to start next week, beginning on Monday with architects Studio E.
Elsewhere in the inquiry on Wednesday, the firm that ran the building, the now-defunct Kensington and Chelsea Tenant Management Organisation (TMO), told the inquiry saving money on the £9.2 million Grenfell Tower refurbishment was not its sole concern.
The inquiry has heard that combustible cladding panels were chosen in 2014 to help save £454,000 on the refit.
Alice Jarratt, representing the TMO, said it was "not the case" that minimising costs was its "only consideration for the project".
She said: "It was the TMO’s firm understanding that this value engineering exercise was standard industry practice and would in no way compromise on quality or safety.
"While there will inevitably be pressures on budgets in any multi-million project, it was never the TMO’s policy or approach that this should negatively impact on quality or compliance."
Administrator and quantity surveyor Artelia said from 2012 until 2017 it was "significantly involved" in the tower’s refurbishment but there were some "important limits" on its role, which did not stretch to that of project manager.
Its counsel Richard Spafford said it was of no "particular surprise" that the TMO did not appoint a project manager as it was a "substantial and sophisticated entity" which had "experience, resources and expertise".
He said: "The TMO portrays itself as no more than a reactive, passive and inexperienced bystander, powerless as those around it let it down.
"The TMO may have been let down, that is a matter for the inquiry, but its portrayal of itself is not accurate."
Can witnesses refuse to give evidence to the inquiry?
Under Section 22 of the Inquiries Act 2005, a witness can refuse to give evidence if it might incriminate them.
But the Attorney General has the power to rule that no evidence given by witnesses, whether oral, written or in document form, "will be used in evidence against him or her in any criminal proceedings" except if they are charged with conspiring to or giving false evidence to the inquiry.
Unite general secretary for legal affairs Howard Beckett said: "The corporate manslaughter legislation in the UK is already weak enough, without giving companies, who could have been culpable in the deaths of 72 innocent people, immunity from prosecution."
A collective application sent to the Grenfell inquiry for witnesses said the pledge would "fulfill the inquiry’s primary obligation … in the most effective and least disruptive manner".
It reads: "Since the conclusion of the phase one hearings many witnesses to be called in phase two have been interviewed, or invited to attend an interview, under caution by the Metropolitan Police (and some may be re-interviewed during the course of the second part of the inquiry) as the criminal investigation into the fire at Grenfell Tower continues in parallel with your investigations.
"We collectively write to request that you seek an undertaking from the Attorney General preventing the use of evidence given by witnesses to the public inquiry against them in any future criminal proceedings."
The inquiry is due to run until June 2021, and more than 93,000 documents have so far been disclosed.