Police leaders were found to have spread false narratives about that disaster, blaming Liverpool fans, and withheld evidence of their own failings.

The new law will force public officials to tell the truth during investigations, including those into major disasters.

But a director of the campaign behind the new law, Pete Weatherby, told the BBC he has been “misled” by the government during negotiations over how it will apply to the intelligence services.

He said the campaigners had agreed a position where a key part of the law would apply to individual intelligence officers, but the government then added a “buried” clause to the draft legislation that would prevent it from working as intended.

The government said: “We are listening to feedback about how to strengthen [the law] whilst also protecting national security.”

Known as the Public Office (Accountability) Bill, the new law has three pillars:

The first establishes a general duty of candour on all public officials, meaning they will be required to tell the truth proactively in their working life

The second is an ancillary duty of candour that applies to official investigations, which includes inquiries and inquests

The third is set to re-balance funding for legal representation for state bodies and victims during inquiries

The bill would create criminal sanctions for breaches in the duty for candour.

Labour’s manifesto for the 2024 general election said: “Labour will introduce a ‘Hillsborough Law’ which will place a legal duty of candour on public servants and authorities.”

Speaking last year, Sir Keir said the new legislation would change “the balance of power in Britain” to ensure the state could “never hide from the people it is supposed to serve”.

But barrister Pete Weatherby KC, director of Hillsborough Law Now (HLN) campaign group, told the BBC the government had “misled” him during negotiations over how the law will apply to MI5, MI6 and GCHQ.

He represented victims’ families during the landmark Hillsborough inquests a decade ago and has played a central role in making the new law a reality.

He also represented families bereaved by the Manchester Arena attack during the public inquiry into that atrocity, during which MI5 was criticised for giving a false account.

“The problem was that MI5 decided to protect themselves after the fact, and advance the false narrative,” Weatherby told BBC Radio 4’s Today programme.

“And that just means that those failures will repeat in the future, and nobody will have confidence in MI5.

“If this law is passed and they’re required to tell the truth even when things go wrong, then failures can be rectified and people can be safer in the future.”

He added: “MI5 shouldn’t be given a free hand to run a false narrative to protect themselves, rather than to advance truth and justice.”

He said HLN accepts there are some caveats that will apply to MI5 and the intelligence services, as the prime minister himself has said.

During the Manchester Arena public inquiry, and an earlier official review, MI5 provided a false narrative about intelligence it received about the suicide bomber before the attack.

The public inquiry chairman concluded that the statements had not presented an “accurate picture”. He also found MI5 missed a significant opportunity to take action that might have prevented the attack.