Hospital doctors who quit their jobs are being routinely forced to sign "gagging orders" despite legislation designed to protect NHS whistleblowers, it is revealed today.

Millions of pounds of taxpayers' money are being spent on contracts that deter doctors from speaking out about incompetence and mistakes in patient care.

Nearly 90 per cent of severance agreements hammered out between NHS trusts and departing doctors contain confidentiality clauses.

A joint investigation by the Bureau of Investigative Journalism and Channel 4 News has discovered that at least 170 doctors in England and Wales agreed such a settlement with the trust employing them – backed up by pay-offs totalling more than £3m.

Fifty-five of the 64 contracts supplied by the trusts to the investigation team contained gagging clauses. The agreements have to be approved by the Treasury. The bureau discovered that a further 19 NHS staff who decided to go to employment tribunals after blowing the whistle on hospital standards eventually settled before their allegations were made public.

The widespread use of "gagging orders" against senior NHS staff who could raise patient safety concerns will intensify the doubts over the protection given to whistleblowers.

Campaign groups claim that NHS managers sometimes resort to intimidatory tactics to deter medics from coming forward, while others that break cover can face years of expense and uncertainty before their cases reach court. The result, they say, is that doctors accept the gagging clauses in order to protect their careers and avoid legal wrangling.

Mike Parker, of the Royal College of Surgeons, said: "The trusts find something upon which they can influence this individual and hold them virtually to ransom, and say: 'You speak up and this will happen.' It's effectively a form of bullying, if you like, but we do hear about this sort of thing happening."

Using Freedom of Information (FoI) requests, it emerged that 71 NHS trusts had entered into these agreements with a total of 170 doctors, although the true figure could be higher, as many failed to respond.

Twenty-two of the agreements were signed at the South London and Maudsley NHS Foundation Trust.

Forty spent a total of just over £3m on the agreements. However, a further 31 trusts simply refused to disclose the size of the payments. Further FoI requests discovered that another 19 health whistleblowers decided to take their cases to court, but abandoned them after signing so-called compromise agreements with employers.

David Bowles, the former chairman of an NHS Trust, told Channel 4 that he believed their use was "endemic". "You shouldn't be at a position of needing a compromise agreement with a whistleblower. You should never get to that point in the first place. You should have listened to the concerns and you should have managed them in accordance with legislation and indeed the NHS's own published code."

Worries over gagging orders in the NHS were underlined by the recent disclosure that Kim Holt, a pediatrician, repeatedly raised the alarm about children's services at St Ann's Hospital in Haringey, north London, more than year before the death of Baby Peter in 2007. Her employer, Great Ormond Street Hospital, reportedly offered her £120,000 to stay silent but she refused. The hospital denied it was an attempt to gag her.

Andrew Lansley, the Health Secretary, has acknowledged that a scandal of care at Mid-Staffordshire hospital went undetected because whistleblowers' warnings went unheeded.

Whistleblowers gained full protection from dismissal or victimisation under the Public Interest Disclosure Act (PIDA) of 1999, which was supported by unions and all political parties. It covers employees in both the public and private sectors.

It followed a succession of cases where whistleblowers had been ignored, including the problems at Bristol Royal Infirmary, where 29 babies and children died after heart surgery. In opposition, the Conservatives said they would give NHS staff the contractual right to report errors and failings to the health regulator without fear of reprisal.

Shonali Routray, a lawyer at the charity Public Concern at Work, stressed last night that the law protected whistleblowers even if they had signed confidentiality clauses.

But she added: "They have a real fear factor and discourage people from raising concerns. The worry is the person who has signed the agreement feels under pressure, or vulnerable, or do not understand their options."

A spokeswoman for the Department of Health said last night: "The Health Secretary has made it clear that patient safety should be at the heart of the NHS and that the improvement of whistleblowing policies is a key part of this ... organisations across the NHS will also need to be clear that whistleblowing is not something that should be regarded as letting down your organisation."

The full report will be on Channel 4 News tonight at 7pm.

Case Study

Dr Kim Holt: 'Baby P hospital offered £120,000 for me to be quiet'

A consultant paediatrician who told the Baby P inquiry that her unit had inadequate staffing levels was offered £120,000 to keep quiet, she has revealed. Dr Kim Holt, left, repeatedly told her management she believed children's services at St Ann's Hospital in north London were unsafe and first approached them more than a year before Baby P's death. Her employer, Great Ormond Street Hospital, was willing to give her £120,000 to stop her talking publicly about her concerns and to sign a document agreeing they had been addressed.

Baby P, whose real name was Peter Connelly, died in August 2007 two days after being taken to St Ann's where a locum failed to spot his back was broken. Dr Holt and three other consultants had written a letter to management the previous year warning the clinic was "falling apart" and risking patients' lives. She was offered the money after Baby P's death.

"I was not going to be gagged," she said. "I've done nothing wrong. I raised concerns: it was obvious the place was a mess. I refused to retract my concerns. They wanted me to stay quiet.

Gagging orders are wrong and shouldn't happen. I don't think they should be happening to anyone in the NHS. There should be much more transparency.

"It's not the done thing to challenge management. That's basically it," she added. "The pattern seems to be you make a stand and life is made hell. Most people end up either becoming sick or they take money to end it all. The money is nearly always associated with a gag – what this is about is hiding their inefficiency."

Dr Holt was put on special leave after complaining. Lynne Featherstone, the minister for Women, is among those who have backed her, saying: "I have wondered whether the management would ever be brought to account."