A lot of shocking things happened on Game of Thrones on Sunday, from surprising deaths to stunning developments that don’t happen in the books at all. But one jaw-dropping event did stay completely true to the novels: Cersei’s nude “Walk of Atonement.” Not only was it a faithful representation of what happened in A Dance with Dragons, it was also a pretty accurate depiction of a real-life event that happened during the late 1400s.

Jane Shore was one of King Edward IV’s many mistresses. After his death in 1483 (and the suspicious death of his son, Edward V), Edward’s brother ascended to the throne as King Richard III. Richard wasn’t as charmed by Shore as his brother had been, and charged her and two others with conspiring against him. He accused her of sorcery and witchcraft—the scoliosis-afflicted King believed she used spells to “waste and wither” his body—but couldn’t come up with enough evidence. Had he been able to, her sentence would likely have ended with her head in a basket at the Tower of London. Instead, she was punished for immorality.

To atone for her “sins,” Shore was condemned to public penance in the form of walking through town while crowds of people watched, yelling and shaming her. She wasn’t totally naked, as Cersei was, but by the standards of the day, she might as well have been: She wore nothing but a kirtle, a thin shift of linen meant to be worn only as an undergarment. Other sources say she wore a plain white sheet. Like the fallen Lannister, Shore’s trek included enduring sharp flint stones in the street that tore at her bare feet.

Unlike the Game of Thrones plot, Shore’s ordeal didn’t end with protectors sweeping her up and whisking her away to safety. Instead, she remained in Ludgate Prison until the King’s Solicitor General, Thomas Lynom, fell in love with her and asked her to marry him. Through Lynom, she received a pardon and was able to live the rest of her life in relative quiet—something Cersei Lannister will certainly not do.