MEXICO CITY — An 11-year-old boy wielding two guns opened fire in his private school in northern Mexico on Friday morning, killing a teacher and wounding at least six other people, before killing himself, officials said.

The wounded included one teacher and five students, Adelaido Flores, a regional public security coordinator in the northern border state of Coahuila, said in an interview with Milenio TV.

Officials said the boy had been a well-behaved student who earned good grades. But Coahuila’s governor, Miguel Ángel Riquelme, said at a news conference that the boy had given what now appears to have been an ominous signal of his plan.

“He told some of his classmates that ‘today is the day,’” the governor said.

Shortly after the boy uttered that phrase, the governor said, he asked permission to go to the bathroom. Fifteen minutes later, when the boy hadn’t returned to class, the teacher went looking for him and found the boy emerging from the bathroom with two guns, Mr. Riquelme said.