Civilian Baha Mousa had some 93 injuries to his body
Soldiers giving evidence to an inquiry into the death of Iraqi Baha Mousa have been granted extra legal protection.
A new ruling states that they will not face disciplinary action if their own evidence suggests they have lied or withheld information previously.
Their own testimony also cannot be used to decide whether to prosecute them, but evidence from other witnesses could still lead to criminal proceedings.
Mr Mousa, 26, died in British army custody in Basra in September 2003.
The inquiry into his death is due to start hearing evidence in the spring.
While announcing some extension to witness protection, Sir William rejected calls for a guarantee that testimony would not be used as so-called "hearsay evidence" in any future prosecutions.
Lawyers had requested that an accusation of wrongdoing by one witness be barred from use as evidence later against another.
But Sir William refused the application, saying immunity only applied to the evidence given by witnesses themselves and they could still be prosecuted if other people with credible evidence came forward to the inquiry.
"Soldiers are public servants who should feel obliged to tell the truth," he said.
"There is the potential for this inquiry to uncover some very serious misconduct by some personnel.
"In the circumstances, in my opinion, it is wholly inappropriate to limit the use of the evidence of some witnesses in subsequent proceedings against another witness or witnesses."
In October, Sir William announced that witnesses giving evidence to the inquiry would not have it used against them in criminal proceedings.
This was, he said, to help the "fullest and frankest" account of events to emerge.
Now, he has gone a step further, ruling that evidence given by a witness will not be used to decide whether to bring a criminal case, including a court martial, against that individual himself.
Soldiers will also not face any internal military disciplinary action - such as dismissal or removal of their pension - if their own evidence suggests they have lied or withheld information previously.
Sir William said the undertakings had been granted by Attorney General Baroness Scotland.
A post-mortem examination on Mr Mousa's body showed he suffered asphyxiation and had some 93 injuries to his body.
Cpl Donald Payne was jailed for a year in 2007 after pleading guilty at a court martial to inhumanely treating civilian detainees in Basra in 2003.
Six other soldiers were cleared of the alleged abuse of the detainees, who included Mr Mousa, who was a hotel receptionist.
Sir William said the inquiry would be primarily concerned with the death or Mr Mousa, and the treatment of others detained with him in Basra by the 1st Battalion The Queen's Lancashire Regiment.
Last July, the MoD agreed to pay £2.83m in compensation to the families of Mr Mousa and nine other Iraqi men mistreated by British troops.