Mr. Dear has not entered a formal plea, and the competency examination and his demand to act in his own defense could add months of delays and vexing complications to the legal case. His public defender, Dan King, has already raised questions about his mental fitness, but prosecutors said Wednesday that Mr. Dear appeared to understand the proceedings and seemed to them to be mentally competent.

Neighbors and relatives have described Mr. Dear as a volatile, sometimes violent recluse who held extreme anti-abortion views and believed religious end times were approaching. He spent much of his life in the Carolinas before moving last year to a barren lot in the mountains about 65 miles west of Colorado Springs, where he and his girlfriend of seven years lived together in a ramshackle white trailer.

In addition to his statements in court, he left a trail online of rantings and religious screeds. In one from 2005, he wrote, “WAKE UP SINNERS U CANT SAVE YOURSELF U WILL DIE AN WORMS SHALL EAT YOUR FLESH, NOW YOUR SOUL IS GOING SOMEWHERE.”

On Wednesday, Judge Martinez briefly cleared the courtroom of everyone except Mr. Dear and his lawyers to discuss his demand to represent himself. Throughout the hearing, the judge answered questions from Mr. Dear, reminded him that his statements could be used against him at trial, and implored him to speak with his lawyers.

Mr. Dear listened as the procedure for the competency evaluation was outlined by Judge Martinez, who at one point interrupted his legal recitation to say, “We’re almost done, Mr. Dear, so bear with me.” Criminal defendants who are found incompetent undergo treatment until they are determined to be able to stand trial.

Mr. Dear told the court that he believed the purpose of the competency exam was to drug him and “make me a zombie.”

“Everybody listening here: Do I sound like I’m a zombie?” he asked. “Do I sound like I have no intelligence?”

On the north side of Colorado Springs, meanwhile, the police barricades are gone from scene of the rampage. Law enforcement officials have handed control of the building back to Planned Parenthood of the Rocky Mountains, and Vicki Cowart, the group’s president and chief executive, said they had started to clean up and repair the damage to get it ready to reopen “as soon as possible.”