It is also not an expensive private school; it is a Ministry of Education institution, and most of the students are on scholarships. In fact, the poorest are paid by the school to attend: one of Mr. Sarmast’s innovations. He hands out weekly stipends that are just high enough to make it uneconomical for the children’s families to put them to work in the fields or begging in the streets.

Mr. Sarmast conceded, “It’s been a pretty rough year.” After the suicide bombing, the Taliban said they had intended to assassinate Mr. Sarmast and would try again. Then information came from the National Directorate of Security, Afghanistan’s intelligence agency, that a squad of four Taliban attackers was getting ready to storm the school. Later, the Australian Embassy warned Mr. Sarmast of credible threats to either the school or himself, and urged him to leave Afghanistan as soon as possible.

He declined. “They didn’t know if the threat was against me or against the school,” he said. “How could I leave and let the school take all the risk, all my students and staff?”

Instead, he stayed and threw his energies into making the school safe, an effort he described with as much brio as if talking about his next concert. He rattled off improvements. There are watchtowers now, as well as other security measures that he asked not be detailed.

What was most important to him, though, was making these changes in a way that did not arouse anxieties among students or their families, but made them feel safer in a society where bomb blasts are a regular feature of life.

The Taliban attack, though it killed one person and wounded more than a dozen others, also had a tremendously uplifting effect, as Mr. Sarmast described it. When he regained consciousness the day after the bombing, he was lying in a bed at Emergency, an Italian-run trauma hospital here, and the staff told him that 200 or 300 people were waiting outside to see him.

“They all came wanting to know if they could give blood or something, anything,” he said. “It was very amazing, very moving and touching.”