COLORADO SPRINGS — Robert L. Dear Jr., the self-described “warrior for the babies” who defiantly admitted to carrying out a shooting rampage at a Planned Parenthood center here last November, was declared on Wednesday unfit to stand trial by the judge overseeing the case.

The ruling by Judge Gilbert A. Martinez found Mr. Dear to be mentally incompetent, and said Mr. Dear suffered from wide-ranging delusions that the federal government had been following and spying on him for years. The judge’s ruling largely relied on the reports of two state psychologists who examined Mr. Dear this winter and said they believed he was not competent.

“That’s called prejudiced! Prejudiced!” Mr. Dear shouted at the judge as he was led out of the courtroom here on Wednesday, shackled and wearing jail scrubs. “Filthy animal!”

The ruling brought the criminal case against Mr. Dear to what the district attorney called “a standstill.” Mr. Dear will be sent to a state-run mental hospital for treatment aimed at restoring him to competency, a legal standard that requires him to understand the court proceedings and help in his own defense.