Martin Bashir has quit the BBC on health grounds before the publication of an investigation into his conduct in securing a 1995 Panorama interview with Diana, Princess of Wales. He has been on sick leave for several months.

The BBC’s deputy director of news, Jonathan Munro, told staff: “Martin Bashir has stepped down from his position as the BBC’s religion editor and is leaving the corporation. He let us know of his decision last month, just before being readmitted to hospital for another surgical procedure on his heart.

“Although he underwent major surgery toward the end of last year, he is facing some ongoing issues and has decided to focus on his health.”

Last year, following pressure from Diana’s family, the BBC director general, Tim Davie, commissioned an independent inquiry to look into how Bashir persuaded the royal to speak on camera about her marriage, and whether Bashir used fake documents to gain the trust of the family. This investigation has now finished and the report has been passed to the BBC for publication.

Panorama is also preparing to air a special programme investigating its original programme.

The interview made Bashir’s career, with tens of millions of viewers tuning in to watch Diana discuss her life with Prince Charles and see her make the infamous declaration that there were “three of us in this marriage”, in reference to Camilla, Duchess of Cornwall.

However, there have always been questions about how Bashir persuaded the princess to speak on camera about the collapse of her relationship with the heir to the throne.

Matt Wiessler, a graphic designer who worked on BBC programmes, previously told the Guardian he was phoned by Bashir one evening in 1995 and asked to mock up some fake bank statements at short notice.

It is claimed Bashir then used the fake documents to convince Diana’s brother, Earl Spencer, that the media were paying associates of the family for information, in a bid to win the trust of the family and secure a more revealing interview.

The BBC launched an internal investigation at the time, with then BBC News chief Tony Hall concluding that Bashir “wasn’t thinking” when he commissioned the graphic but was ultimately an “honest and honourable man”.

While Bashir went on to have a successful career, conducting major interviews with the likes of Michael Jackson, Wiessler found himself blacklisted by the corporation after being made the “fall guy” for mocking up the documents.

Hall later became the BBC director general and was in post when the broadcaster took Bashir on again as religion editor in 2016.

Interest in how Bashir secured the interview was prompted by 25th-anniversary coverage of the broadcast, including ITV and Channel 4 documentaries, which highlighted the role of the fake bank statements.

The BBC has said it holds a handwritten note from Diana stating that the documents played “no part in her decision to take part in the interview”.

However, the media attention and persistent lobbying from Earl Spencer persuaded Davie to launch an independent inquiry into the interview at the end of last year. Some BBC colleagues feel Bashir has been unfairly treated, given that he has already been cleared by one internal investigation.

The later investigation, which was welcomed by Prince William, was led by retired supreme court judge Lord Dyson. He considered how the BBC obtained the interview, whether the tactics were in keeping with the BBC’s standards at the time, and the extent to which Bashir’s tactics influenced Diana’s decision to give an interview.