The killers came hunting their former teachers, gunning them down in their offices and in their classrooms.
At the top of Boko Haram's kill list: head teachers, examiners, primary school staff and science and geography teachers, whose curriculum contradicted the group's flat-Earth ideology.
The second lesson of the day was under way when terror came to Yagana Sanda's school for primary and secondary students in Bama in northeastern Nigeria. Sanda ran for cover as screaming boys and girls scrambled to jump the school's fence, some of them falling and breaking limbs.
Two of the gunmen chilled her: Tukur had once been her brightest student, a earnest boy who had never missed a school day. Gomna had disrupted any class he was in until he dropped out early.
The gunmen headed straight to the office of headmaster Yaya Buba Jam and shot him dead. They killed another teacher, Al Haji Modu, in his classroom.
In Boko Haram's savage campaign to establish an Islamic caliphate in western Africa, education is a primary target. The war on learning has robbed children of years of schooling — a deficit some may never make up — and perpetuated illiteracy and poverty in one of the poorest and least educated corners of Nigeria.
Nigeria's teachers union estimates that since 2009 Boko Haram has assassinated 611 teachers, burned down 910 schools and forced the closure of at least 1,500 others. More than 19,000 teachers and almost 1 million school-age children have fled the violence.
The attack on Sanda's school occurred three years ago, and she recounted the horrors of that day from a displaced persons camp in Maiduguri, where she has resumed teaching.
That Gomna had joined Boko Haram didn't surprise Sanda. The militants mainly recruit poorly educated children of illiterate parents to fight. But Tukur? He could have been someone.
"He was a perfect student," Sanda said. "He was hard-working. He was silent, just concentrating on his work."
But in 2012, Sanda said, Tukur butchered his father with a knife in their home for refusing to join Boko Haram.
Bama is no longer under Boko Haram's control. The group once held vast portions of the country, but a counteroffensive by the government has driven the extremists out of some areas and put them on the defensive. Still, many parts of Nigeria are still threatened by extremist attacks, making it unsafe for schools to reopen or families to return to their towns.
"They were the ones who were looking for us to kill us or slaughter us," said Fatima Liman, another teacher from Bama. "We were living together with them. They know us. They know our houses and some of them are students."
Schoolteachers, who pressed reluctant parents to educate their girls, and kept on teaching despite death threats, are the unsung heroes in Nigeria's war on Boko Haram.
"Every day, they were killing teachers. They targeted us. Some were killed in their houses, some outside their houses, some in the market," said Mariam Sandabe, 38, the former deputy headmistress of another school in Bama. Five teachers at her school were assassinated.
When Boko Haram emerged in 2002, it gained popularity for opposing government corruption. The war on secular education began slowly enough, with the group urging school graduates to burn their diplomas.
After its first major rebellion in the large city of Maiduguri in 2009, then-leader Mohammad Yusuf told police that secular education "is haram," or sinful because, "all knowledge that contradicts Islam is prohibited by the Almighty." That same year the extremists began burning schools.
Boko Haram believes Earth is flat, and that Muslims are permitted to take slaves and duty-bound to kill infidels. Culture and history also play a role in the group's fixation with secular education, according to analysts. British colonialists brought education and Christianity to the region at the beginning of the 20th century, triggering long-held resentment which lingers to this day.
After Nigerian independence in 1960, education's reputation diminished further when well-educated but notoriously corrupt elites developed a reputation for sending their children to top foreign universities using stolen money.
Muslims in the northeast have long been suspicious of secular schooling. More than 52% of boys and 61% of girls in the region had no formal education, according to Nigerian government data in 2013. Seventy percent of women and 48% of men aged 15 to 49 were illiterate.
"There's a perception among Muslims that the content of education is Christian-led. They saw it as a ploy to Christianize their children, so to be a good Muslim was to keep them away from those kind of schools," said Mausi Segun, a researcher with the group Human Rights Watch, who recently wrote a report on Boko Haram's attacks on education.
Aisha Dalhatu, a onetime deputy headmistress in Gudu village, said before Boko Haram's school attacks, teachers vainly urged illiterate parents to keep their children in school. But girls were usually married off by 13 or 14.
"They prefer to give the girls in marriage and get cows and goats," she said, referring to the bride price. But in Bama, Liman said, parents were beginning to accept the benefits of Western education — "until Boko Haram came."
In 2012, the death threats started, like the warning letters dropped at Mafoni Day Secondary School in Maiduguri. On Sept. 25, a senior teacher and examiner, Mohammed Yahaya Nige, was standing by the gate chatting with the geography teacher. Just after he went inside, he heard shots: Gunmen had killed the geography master.
On March 18 of the following year, Nige had finished teaching his first class and dropped by his office for a textbook.
"I was going to sit down, but I decided to move. I had not reached the next building when I heard the shots. The school was in chaos," Nige said. "Nobody knew which direction to run. I and two other teachers ran into a classroom and locked ourselves in."
Three women had fled to Nige's office. All were killed.
Dalhatu, the former deputy headmistress, said her school was shut down after a warning visit from three Boko Haram fighters. "We could not go to the market. We were afraid of being called teachers. They were looking for us," she said.
Fighters went to the home of a local headmistress to kill her. But she was out, so they shot dead her 25-year-old son, Dalhatu said.
One of her former primary school students, Awal Buba, became a Boko Haram commander, and was seen in the village burning schools.
"That's why we cannot go back to our area. He knows us," Dalhatu said.
In July of 2013, 30 male students and teachers were massacred in Mamudo. In September, 50 male students were slaughtered in Gujba. The next year, it got worse. In February, 59 schoolboys in Buni Yadi were burned to death, shot, or had their throats cut.
Abubakar Shekau, by then Boko Haram's unpredictable and violent leader, declared in a chilling March 2014 video that his religion was "nothing but killings, killings and killings," adding, "I hate university! You should quit university. I hate it! Western education is totally forbidden. Girls, you should return to your homes."
He threatened to take women as slaves, just weeks before the abduction of 276 school girls from Chibok.
In Bama, men in wearing black told Sandabe, the deputy headmistress, she would die if she kept teaching. But she and others clung on at the school defiantly, hoping the worst was over. In 2014, she had another visit from two men wearing traditional white cotton jalabiyas, or caftans.
"They … said if I didn't resign they'd come and kill me. I said I had already resigned," she said. Sandabe fled a few months later and now heads a UNICEF-supported school in a displaced persons' camp in Maiduguri.
Teachers in northeastern Nigeria say many Boko Haram fighters are school dropouts or unemployed high school graduates rejected by universities. The region's dire illiteracy rate also left people vulnerable to the extremists' appeals.
"That's why we're suffering," said Sanda, the teacher from Bama. "Boko Haram brainwashed people. There's no teaching in any religion to kill someone or slaughter someone or kidnap someone."
Now Sanda keeps children's dreams alive, by teaching in a displaced persons' camp in Maiduguri. Dalhatu and Liman teach at the same camp.
One recent evening, five camp girls, wearing blue Islamic hijabs, whirled and laughed in a joyful circle at the end of the school day. Two had once seen brothers killed by Boko Haram. Two sisters saw a third sister abducted. Another lost her father to the extremists.
As eloquent as teachers are about the benefits of education, the girls put it better.
Falmata Usman's father was a teacher, supporting his daughters' education when others sent theirs away to early marriage. She saw her brother dragged by Boko Haram gunmen from their house in Monguna, reciting the Koran as his mother pleaded vainly with the killers not to shoot him. At 16, she has completed junior high school at a UNICEF-supported school in the camp.
"If you get educated, you will be useful to yourself and your society — even to your children and relations," she said.
In the classroom the smell of chalk pervades, and the schoolgirl smiles.
"I want to be a doctor."