Labour has withdrawn a costly lawsuit against five former staffers accused of leaking an internal report on antisemitism and “conspiring” against Keir Starmer.

The legal action is expected to have cost the Labour party about £2.4m, according to documents shown in open court, and an extra £500,000 spent on a single hearing, the Guardian revealed last summer.

Ex-staff members, including Jeremy Corbyn’s former chief of staff, Karie Murphy, and his former director of communications, Seumas Milne, have been embroiled in the bitter battle for more than four years.

All of the accused, including the three others, Georgie Robertson, Laura Murray and Harry Hayball, had “strenuously denied, and have consistently denied, any involvement or complicity in the leak whatsoever”.

A joint statement from Labour and the former staffers’ lawyers says: “The party is discontinuing its legal claims against Karie Murphy, Seumas Milne, Georgie Robertson, Harry Hayball and Laura Murray on a ‘no order as to costs’ basis. The five welcome the resolution of the claims.”

Labour’s costs could be significantly higher if they have agreed to pay the five former employees’ costs as part of a confidential agreement.

The leaked report, which runs to more than 800 pages, said factional hostility contributed to the party’s ineffective handling of antisemitism complaints, as well as documenting claims of anti-black racism, Islamophobia, sexism and bullying.

Labour officials claimed that the five accused had “entered into a conspiracy to use unlawful means … to provide a copy (or copies) of the report to the press” to damage the party “under the leadership of its then new leader, Keir Starmer”.

The party continued to pursue the legal action despite repeated warnings from Labour figures who had expressed concerns about the financial risk after the Information Commissioner’s Office (ICO) determined in 2022 that there was “insufficient evidence” that any of the five accused former staffers were responsible.

In April 2020, Martin Forde KC was commissioned by the party’s national executive committee (NEC) to investigate the leaked report and its findings, and his report, published in 2022, noted that “we could not identify the source of the leak”.

Forde had also commented on the Labour party’s litigation against the five in 2023, questioning the decision to bring the legal action and describing it as a “terrible shame”.

The Labour peer John Hendy KC said: “It’s good to see that this ill-advised litigation has finally been abandoned. The party should have congratulated those who wrote the ‘Leaked Report’ documenting the misdeeds, racism and factionalism of party staff, which formed the backdrop to the Forde report. As Forde recorded, the racism and factionalism continued, strikingly in the abusive treatment of Diane Abbott which continued up to last week.”

Last August an NEC member from the pro-Starmer wing told the Guardian that Labour should be “questioning this monumental waste of members’ and affiliates’ money pursuing what appears to be a pointless political vendetta”.

On Thursday Mish Rahman, who also sits on the NEC, said: “We’ve just had two weeks of campaigning dominated by Starmer’s attacks on the candidacies of Diane Abbott and Faiza Shaheen, driving more minority ethnic voters away from the party … this pointless and vindictive failed lawsuit is another example of Starmer allowing his bully boys to get carried away with their war on the left when it’s clearly not in the party’s electoral or financial interests to do so.”

The ICO’s investigation was one of three inquiries, none of which found the five former staffers to have been responsible for the leak.