Lisa and the Devil

Tourist Lisa Reiner (Elke Sommer) wanders away from her tour group in Toledo to go shopping inside a store, where she encounters a man named Leandro (Telly Savalas), who is purchasing a dummy and a carousel Lisa attempts to buy. Due to his resemblance to the portrait of the devil in a fresco she has just seen, Lisa flees, only to be confronted by a mustachioed gentlemen...who falls from a flight of stairs to his apparent death.
When she fails to find back to the tour group, she takes refuge with a couple and their driver, who agrees to help Lisa get to her hotel. But their car breaks down in front of a crumbling mansion where Lisa discovers that Leandro works as the butler. The couple (a young woman and older man) persuade Leandro to let them stay while the driver (the young wife's lover) fixes the car. Lisa attempts to flee, but the countess' son Maximilian (Alessio Orano) stops Lisa and agrees to let the three stay over the objections of his mother, a blind Countess (Alida Valli).
The obscure, mustachioed man continues to stalk Lisa as further mysteries unfold: the Countess and her son have a fourth guest in the mansion, a mysterious figure who is held prisoner inside a secret room. The Countess, Maximilian, Leandro, and the mustachioed man (revealed to be Carlos, the Countess' second husband) claim that Lisa is actually,"Elena," Maximilian's long-lost girlfriend who was once frightened away by his jealous mother.
Through a series of waking dreams, it is revealed that Elena was secretly sleeping with Carlos and that he was plotting to leave the jealous and reclusive Countess. After seeing Leandro preparing Carlos' body for burial juxtaposed with Carlos being alive, Lisa freaks out. Carlos attempts one last time to whisk Lisa away but Maximilian kills him. Lisa faints as Carlos' body morphs into the dummy Leandro purchased in the store. Leandro repairs the dummy (whose face has caved in, in the aftermath of the murder attempt).
The driver is promptly killed by a mysterious figure after fixing the car. Leandro offers to cover up the crime to his employers so long as they let him dispose of the body. When the husband demands his wife leave with him -- she runs over him, only to be brutally murdered by Maximilian.
While Lisa is unconscious, Leandro dresses her like Elena. He gives a speech about how he is a demon that is indebted to the Countess and her son. The mansion is cursed and the Countess, her son, the couple, their driver, and Elena are forced to relive their deaths again and again, with dummies being procured by the demon to represent the players as they repeat the cycle of death. Lisa's arrival ultimately negated his inability to find a Lisa dummy to represent her in this latest incarnation.
Lisa wakes up and finds the Countess, who has discovered the young wife's corpse. Lisa intends to escape, but a defeated and browbeaten Maximilian has started to believe that Lisa is just like Elena. He takes her to his secret room, where Elena's corpse and ghost are revealed to be the mystery prisoner. Maximilian drugs Lisa, strips her naked and rapes her, only to have the ghost of Elena laugh at him mid-rape and cause him to stop. Furious, he goes downstairs and confesses his crimes to his mother, who wants him to kill Lisa to keep anyone from finding out what he has done.
Maximilian reveals to his mother his crimes: having murdered his stepfather to avenge his betrayal of the Countess and his stepson, Maximilian then imprisoned Elena rather than risk allowing her to leave and inform the police. Maximilian kills his mother when he realizes that she will never let him leave her or allow him to have a relationship with Lisa.
After doing so, Maximilian is shocked to find all of his victims (the married couple, their driver, Elena, and his mother) waiting for him at a table. As his mother attempts to kill him, Maximilian jumps from a window but is impaled on the metal fence below. Leandro reveals himself behind the corpses making their appearance and says that Maximilian "accidentally slipped."
Lisa wakes up the next morning, naked, with the mansion in ruins. She finds the dummy representing Maximilian, beseeching her to stay. Later in town, she runs into Leandro, who is presented with a "Elena" doll by the shop keeper. Leandro refuses the doll as Lisa boards her plane, intending to leave Italy. The entire plane turns out to be empty. She discovers the corpse of the men and women she met the previous night. Rushing to find the pilot, she discovers him to be Leandro. Lisa collapses, reverting to a dummy, as it is implied that Lisa was some form of reincarnation/dummy doppelganger of Elena and that Leandro has reclaimed her.

Question: Who is the mystery prisoner ?
Answer: Elena's corpse and ghost is revealed to be the mystery prisoner.