A school has apologised after children were set homework asking them to imagine they were the parent of a victim of the Manchester Arena bombing.

The pupils at Bridlington school, in east Yorkshire, were asked to write a response to the view that “all terrorists should be forgiven”. But parents of the year 8 pupils took to social media complaining that the homework was “not acceptable”.

The PSHE (personal, social, health and economic education) task was posted on the Showmyhomework app, used by many schools to coodinate homework between staff, students and parents.

The headteacher, Kate Parker-Randall, said: “Firstly I would like to apologise for any upset that this piece of work may have caused. The essay was set as part of a personal, social, health and economic education lesson which was considering the consequences of crime and the aims of different punishments.

“It followed a discussion in class about a newspaper report that the mother of one of the victims of the Manchester Arena attack had forgiven the bomber for killing her son. The essay was intended to allow students to formulate their own views about whether hate or forgiveness are the best response to even such terrible crimes.”

Salman Abedi killed 22 people when he detonated a bomb at an Ariana Grande concert at Manchester Arena in May 2017. His brother, Hashem, is due to go on trial in January next year charged with the murder of 22 people, the attempted murder of others who were injured, and conspiracy to cause an explosion.

Parker-Randall said: “I would like to reassure parents, pupils and the community that the feelings aired on social media were totally unintentional consequences of setting this homework. However, I do understand that some people may find it difficult to understand why a school would ask students such a challenging question.

“It is important that students should be able to express their own thoughts and give reasons for their feelings. However, having reflected on the matter we would in hindsight have posed the homework question in a different way.”