A boy was critically injured on Sunday afternoon after a woman opened fire at a Christian megachurch in Houston led by Joel Osteen, the televangelist and pastor, the authorities said.

At just before 2 p.m., the woman, holding a rifle, wearing a trench coat and carrying a backpack, entered Lakewood Church, among the largest congregations in the United States. She came with a boy of about 4 or 5 years old, Chief Troy Finner of the Houston Police Department said at a news conference on Sunday.

Two off-duty law enforcement officers who were working at the church on Sunday shot and killed the woman after she opened fire, Chief Finner said.

The boy was also shot, though it is unclear by whom. He was in critical condition at a hospital. A man in his 50s who was shot in the leg was hospitalized in stable condition, the chief said.

The woman, who was described by officials as being in her 30s, also threatened that she had a bomb, and appeared to have sprayed an unidentified substance on the ground, Chief Finner said. The authorities did not find any explosives, he said.

“She had a long gun and it could have been a lot worse,” he said. The motive for the shooting was unclear.