Petrich, J. Worswick, C.j., and Alexander, J., concur.
In October 1986, Police Officer Larry Walker was killed and Officer David Paul injured when Paul's gun discharged as Paul struggled to subdue Jeffrey Westmark. Debra Walker, personal representative of the
estate of Larry Walker, and David Paul appeal a summary judgment dismissing their claim that the State of Washington, through Western State Hospital, negligently caused Officer Walker's death and Officer Paul's injuries. We affirm.
 On appeal from a summary judgment, this court engages in de novo review; we make the same inquiry as the trial court, looking to the pleadings, depositions, admissions, and affidavits to determine if there are any genuine issues of material fact and if the moving party is entitled to judgment as a matter of law. Wilson v. Steinbach, 98 Wash. 2d 434, 437, 656 P.2d 1030 (1982).
In July 1986, Jeffrey Westmark was arrested and charged with assault in the second degree and theft in the second degree. At Westmark's arraignment, the trial court ordered that Westmark be admitted to Western State Hospital for a 15-day competency evaluation. After 15 days, psychologist Carl Redick and psychiatrist Thomas Corlew submitted a written evaluation to the court, advising the court that Westmark was incompetent to stand trial. The court then signed an order extending Westmark's commitment for 90 days. Shortly thereafter, the doctors advised the court that Westmark was competent to stand trial. Westmark was promptly returned to Pierce County Jail.
Westmark's behavior apparently deteriorated. The court sent Westmark back to Western State for an additional competency evaluation. Dr. Corlew advised the court that Westmark was competent to stand trial, although he failed to inform the court that he had also determined that Westmark was very dangerous. Upon returning Westmark to the Pierce County Jail, Dr. Corlew placed him on administrative leave rather than discharging him in order to simplify the paperwork should Westmark return. Westmark eventually pleaded guilty to the charges against him. The trial judge released Westmark on his own recognizance pending sentencing. Upon learning of this, Dr. Corlew discharged Westmark from "administrative leave" status at Western State.
A few days later, Officers Paul and Walker responded to a domestic violence call at the Westmark residence. Westmark attacked Paul injuring him with a knife; they struggled and Officer Paul's weapon discharged, accidentally killing Officer Walker.
Walker and Paul argue that Western State was negligent (1) in failing to inform the trial court that Westmark was substantially dangerous, (2) in discharging Westmark from the hospital, and (3) in failing to petition the trial court to involuntarily commit Westmark.
 We hold that judicial immunity insulates Western State from liability for the first two of its allegedly negligent acts and that a lack of duty precludes liability for the third. The doctrine of judicial immunity protects individuals who participate in judicial proceedings from civil liability for acts related to that participation. Bruce v. Byrne-Stevens & Assocs. Eng'rs, Inc., 113 Wash. 2d 123, 129, 776 P.2d 666 (1989); Tobis v. State, 52 Wash. App. 150, 154, 758 P.2d 534 (1988). This doctrine has been extended to state mental health professionals acting in association with the judicial function:
When psychiatrists or mental health providers are appointed by the court and render an advisory opinion to the court on a criminal defendant's mental condition, they are acting as an arm of the court and ...