A school has apologised for writing to the parents of a dead pupil to demand she improve her attendance
The parents of Megan Gillan, 15, who was found dead at home in January, received the letter from Macclesfield High School, in Cheshire.
The school blamed computer software which automatically generated letters and warned it could affect thousands of other schools in the UK.
It said headteacher Ged Ward had telephoned Megan's parents Mark and Margaret to apologise for the mistake and for the distress that the letter caused them.
A statement issued by the school said: "The mistake happened as a result of a problem with the software, School Information Management Systems (SIMS), which is used by the school.
"Megan's name had been taken off the school roll when she died, and removed from the main school database.
"However, unknown to the school, her details had remained in a different part of the computer system and were called up when the school did a mail merge letter to the parents of all Year 11 students about their Prom.
"The letter called up details of each student's attendance for the whole year to date and because Megan had been on roll in September, she was included."
Phil Neal, managing director of SIMS, Capita Children's Services, said: "What has happened is absolutely tragic and our thoughts are with Megan's family. When a child is no longer attending a school, for whatever reason, the software will allow the school to continue to produce letters to their parents as occasionally it is necessary to do so. It appears that this is what has happened in this case which everyone involved deeply regrets."
He added: "We are committed to making changes to the software within the next week that will ensure schools can no longer send attendance letters out to pupils no longer at the school. The changes should prevent this situation from happening again."