Oof there's a lot to talk about this one
This lovely gal right here was based on the world-wide popular legend of the Bloody Mary, known here in Brazil as either "Loira do Banheiro" (Bathroom Blonde) or "Maria Sangrenta" (Bloody Mary). There's a crap ton of variation to this story starting already with summoning methods, some of which are: standing in the front of a mirror in a female school bathroom and repeating her name thrice, slamming the bathroom's door shut, kicking the toilet, then flushing it and saying a swear word, etc.
The latter is quite popular in the school Conselheiro Rodrigues Alves, in Guaratinguetá - São Paulo. According to popular lore, the legend of the Bathroom Blonde is based on Maria Augusta de Oliveira, born in the 19th century. Her father forced her to marry a rich man when she was 14 years old. Since she was unhappy with the situation, she sold her jewelry and ran away to Paris when 18. She lived there until 1891, when she died in mysterious ways - her death certificate disappeared. Her family asked for the body to return to Brazil until the coffin was done. But even after that happened, her mother didn't want to bury her. It took a series of nightmares for her to give in and bury her daughter.
A few years later, the mansion in which the family lived in was turned into the school I mentioned, and they say that she's still haunting it,showing up frequently in the female bathrooms. A fire in 1916 made the legend even stronger within the community, and the school had to be rebuilt.
Sorry for this giant block of text but there's a lot of lore with this one and I wanna share