Kaileena

Kaileena, also known as the Empress of Time, is an antagonist-turned-supporting character in Prince of  Persia: Warrior Within and The Two Thrones. The creator of the Sands of Time, she attempts to stop the Prince from rewriting his own history on the Island of Time. She is later used against him and the people of Babylon when the Vizier kills her to re-release the Sands of Time and gain immortality.[1]

History
Creation

Kaileena was inadvertent a by product of the Gods when time itself was created. She wields the power of time itself and used it to create the Sands of Time. On Island of Time, she presumably created the Artifacts of Time, Shahdee, and several other Sand Creatures using the Sands of Time.

At some point in time she was killed by the Dahaka, the guardian of the timeline, resulting in the creation of the Sands of Time and its discovery by the Maharajah of India. Stories of her power reached as far as Persia and inadvertently sets the Prince on his path to change time itself when he attempts to change his fate. Her past selves attempt to use the ability over the timeline and the Sands of Time to change her fate despite its apparent predetermined path.

Meeting The Prince on the Island of Time
Kaileena and the Prince first meet when Shahdee attempts to kill her. The Prince kills Shahdee and asks Kaileena for information, but she is secretive at first. When she meets him later in the game, she frequently tells the Prince not to continue his journey as his fate cannot be changed.

Though she says this, she helps him throughout his journey, giving him weapons (the Serpent Sword and the Lion Sword) and providing knowledge about the fortress towers which are used to open the door to the throne room. The Prince continues his journey despite her advice against it. When the Prince opens the fortress doors, it is revealed that Kaileena herself is the Empress. She had sent Shahdee to kill him and even cursed his sword. In their first fight she is killed, which results in the creation of the Sands of Time.

The Prince then uses the Mask of the Wraith and travels into the past to change his fate. He returns to a point in time before Kaileena is killed and arrives at the throne room before her, knowing that she would soon arrive.

When Kaileena arrives, the Prince alters the events of the previous encounter by throwing her and himself out of the throne room and in to the warp room. There they are sent into the present, in order to kill her once and for all. However, he saves her life from the Dahaka. The Prince defeats the Dahaka instead and spares Kaileena, offering her his protection.

The Prince and Kaileena are alone together on the Island of Time. They build a ship then set sail for Babylon. As the ship departs Kaileena takes one last look at her home and heads for the lower level of the ship. During the voyage, she sleeps with the Prince and they presumably experienced a vision of Babylon burning and ravaged by an army.

To Babylon
Following the canonical ending, Kaileena and the Prince sail back to Babylon and have begun a romantic relationship. Though, she is content with the choice the Prince made in regards to saving her life, she suspects the change in the timeline has altered their fate and current events for the better. The Prince, however, does not appear concerned with the possible change. He promises no harm will come to her in Babylon.

However, because of the Prince's efforts on the Island of Time to prevent the Sands of Time from ever being created, the events of the original games never happened, and the Vizier was still alive to attack the city. The boat they sail on is attacked and destroyed, and the Prince and Kaileena drift to shore. The unconscious Kaileena's is dragged off the beach by soldiers, with the Prince in pursuit.

Death and Aftermath
Kaileena is then taken to the Vizier in order to be sacrificed in the name of his immortality. However, the Prince gives chase, heading to save her. But as the Prince arrives, he is struck in the arm by Mahasti withDaggertail, a razor-blade chain weapon, pinning him and stopping him from reaching Kaileena.

The Vizier reveals that he has the Dagger of Time, while Kaileena was in shock the Vizier stabs her in her stomach ending Kaileena's life. As Kaileena dies she transforms into sand and unleashes the the Sands of Time upon the city, corrupting everything (including the Vizier's Generals and the Prince) around her. The Vizier turns and stabs himself with the Dagger of Time, transforming himself into Zurvan, the self-professed "God of Time". The Prince grieves over her death and and seeks to avenge her death.

When the Prince defeats the Vizier at the end of the game, the Sands of Time are brought together in the form of Kaileena's spirit. Kaileena tells the Prince and Farah that this world was not meant for her. There will be other worlds. She destroyed the Dagger of Time and removed the last of the Sands within him before departing.