I first met Umair Asim 15 years ago after an astronomy talk I gave in Lahore, Pakistan. He peppered me with questions about telescopes, astrophotography and the physics of stars. In the following years, Asim finished a masters degree in astronomy and went on to establish a sophisticated observatory on the roof of his house.

But what truly lights up Asim is his passion for public education. During the International Year of Astronomy (IYA) in 2009, Asim helped lead and organise numerous public observations in Lahore as well as in government schools in smaller cities and towns in Punjab. Wherever he went, he would bring his telescope with him. During IYA, it was a common sight to see Asim standing in front of an audience of 500, first explaining to them basic principles of astronomy and then entertaining long lines of people – from ages eight to 80 – to show them craters of the moon and rings of Saturn.

It is not hard to explain where his passion for public education comes from. His parents established Farooqi Girls' High School 34 years ago. It is now considered one of the premier private schools in Lahore. Asim also serves as vice principal and I get emails from him when a student or students from the school would take top positions in the province-wide exams.

But on 31 October the school was burned to the ground by a crowd who had heard it was accused of blasphemy. Lab equipment and computers were looted. Hundreds of library books – obviously with little use to the mob – tossed into the fire. Some even tried to pull the marble tiles off the floor.

The blasphemy accusations are not related to astronomy. Instead, they centre on a teacher at the school, Arfa Iftikhar. In a rush for the start of the Eid holiday, she accidentally missed a page while copying a homework assignment for the class. Her mistake merged a line about the prophet of Islam with the lines of a chapter on beggars. A parent of one of the students in her class noticed it, and the chatter of blasphemy spread quickly.

It did not matter that this was an unintentional mistake. In the current climate, it is comically easy to accuse someone of blasphemy in Pakistan. In fact, in this instance, the blame was also extended to the school administrators, including Asim.

The accused teacher is now in hiding and the police have arrested the 77-year-old principal of the school. He also happens to be Asim's father, and his appeal for bail has been denied by the court. Asim and the rest of his family are now in "protective custody".

It might be easy to blame religion here. But this is not a battle between freethinkers and religious zealots. Asim and his family are pious Muslims. The students at the school start their day with the name of God. I don't know the accused teacher, but it is quite likely that she also belongs to a religious middle-class family. Intentionally committing blasphemy against the prophet would be appalling to all those involved.

The burning of the school is probably about a clash between the upwardly mobile, educated middle class and the frustrated, poor and uneducated lower class. The school's success and resources – and that also for a girls' school – must have elicited envy. The mistake by the teacher provided the excuse to use the blasphemy law to vent their frustration.

This blasphemy law is devouring Pakistani society from within. It is an all-purpose tool in the service of intolerance. It has often been used against religious minorities, but Muslims are paying the price as well. The repeal of the law, unfortunately, is unlikely. Some voices critical of the law have already been silenced by intimidation and violence, such as the assassination of the governor of Punjab, Salmaan Taseer in 2011.

Maybe the school will recover, and the damages will be covered by donations of concerned individuals. There have already been counter-protests. Two days after the burning of the school, about 2,000 women – mostly former and current students – gathered near the school holding placards demanding the release of the principal and the reopening of the school.

But what is the future of Asim, his family and the accused teacher? With the charged emotions around blasphemy, once accused, it is virtually impossible to ever be safe afterwards, even if the court clears your name. Like the era of European witch trials, Pakistan is going through its darkest phase.

If she is lucky, the accused teacher will be able to find asylum out of Pakistan. Asim's father, now sleeping on the floor of a jail cell, will have to cope with the fact that all the effort that he and his wife poured in for those past 34 years is gone.

And Asim – one of Pakistan's brightest gems – must be wondering if he will ever feel safe in a country where he shared his love for astronomy with so many people.