SAN JOSE, Calif. — Three people facing charges of killing a 3-year-old girl during an alleged exorcism at a San Jose church had believed she was “possessed by a demon,” so they engaged in a ritual to “liberate” the child, a police lieutenant testified Monday.

One reason the girl could have been possessed, the lead police investigator said on the stand, was that her family believed she might have seen something sinister on her mother’s cell phone.