Prince of Persia: The Two Thrones is a 2005 action-adventure video game developed by Ubisoft Montreal and Ubisoft Casablanca, and published by Ubisoft for the PlayStation 2, GameCube, Microsoft Windows, Xbox and Java (mobile phones only). The game was later censored and ported to the PlayStation Portable and Wii in 2007 under the title Prince of Persia: Rival Swords. The Wii version utilizes the motion-sensing functionality of its controller, while the PSP version added exclusive content and local multiplayer.
 The Two Thrones is the sixth main installment of the Prince of Persia series, and the final chapter of the Sands of Time trilogy, but is not the last game to be set in its continuity. The story follows the Prince as he returns to his home in Babylon, only to find that his actions in Warrior Within have undone the events of The Sands of Time. The villainous Vizier is back from the dead and kills the Prince's companion Kaileena, absorbing the Sands of Time from her, which transform him into an immortal monster. Now, the Prince must work together with his past love Farah (whom he meets for the first time in this new timeline) to defeat the Vizier once and for all, while also struggling against his own Dark Prince persona, which is slowly corrupting him.
 Upon release, the game received generally positive reviews, with praise for its story, characters, level design, graphics, combat and new speed kill mechanic, but the PSP and Wii versions reviewed significantly worse than the others. It was also a commercial success, selling over 1.5 million copies within one month of release. Following The Two Thrones, the series was rebooted a second time with 2008's Prince of Persia. The series returned to the Sands of Time continuity with 2010's Prince of Persia: The Forgotten Sands, which is set between the events of The Sands of Time and Warrior Within.
 The game combines exploration and combat. Both elements make use of the Prince's acrobatic capability and agility. Throughout much of the game, the player must attempt to traverse the palace by running across walls, ascending or descending chasms by jumping back and forth between walls, avoiding traps, climbing structures and jumping from platform to platform, making other types of well-timed leaps, solving puzzles and using discovered objects to progress. There are also a few on-rails sequences where the Prince must ride a chariot along a long stretch of road at a dangerous, fast speed, requiring the player to avoid obstacles and fend off enemies along the way.
 During combat, many of the same moves vital to the player in other situations can be put to use to overpower enemies. An example is the ability of the Prince to jump off walls in order to strike enemies decisively. The player generally attacks enemies and blocks using a dagger, although other objects or factors, such as the Dagger of Time and its time-control abilities eventually prove to be critical to victory. The Dagger of Time can also be upgraded by disabling "sand gates" that enemies may use to summon reinforcements, which will increase the number of sand charges it can hold for its powers and eventually unlock two new abilities that consume multiple sand charges to damage or destroy multiple enemies at once. Continuing the freeform fighting style employed in Warrior Within, the Prince can also obtain secondary weapons from defeated enemies or weapon racks and use them in dual wield combat, with most weapons having limited durability and becoming unusable after a certain amount of hits, or after they are thrown as projectiles or dropped when the Prince turns into the Dark Prince. The Wii version of the 2007 port, Rival Swords, implements attacks with generic shakes of the Wii Remote and Nunchuk, with the former swinging the Dagger and the latter swinging the equipped secondary weapon.
 In The Two Thrones, the Prince's acrobatic skills have improved and is now able to launch himself off walls at 45 degree angles at strategically placed vertical shutters, slide down chutes and balance on swinging poles, among other things. The designers have also improved the stealth system. Instead of merely being able to do more damage when striking without being seen, the game uses a Speed Kill system to provide a single opportunity to instantly defeat an enemy or two. To succeed in doing so, the player must press the attack button at certain times (with the number of required hits and the intervals between each attack cue depending on the target); failure to do so results in the target throwing off the Prince. The same system is also integral to dealing damage in some of the boss battles. Attacks against enemies feature graphic violence effects that can be toggled in the in-game options menu, but are removed in Rival Swords.
 The Prince also develops a split personality, known as the Dark Prince, and this alter ego constantly bickers with him in his mind about right and wrong as just an inner voice for most of the time. At certain times, the Prince will automatically and physically transform into the Dark Prince, which the player cannot do at will. During these times, however, the Prince retains control of his body, and the player still has control over the character. When controlling the Dark Prince, the player loses the ability to wield a secondary weapon, instead using the "Daggertail", a bladed whip fused to his arm. This special weapon can slash enemies at mid-range and is critical to pulling blocks out of walls and grappling along torches or high bars to cross long gaps. The Dark Prince also constantly loses health as a result of the semi-transformation, with eventual death from the loss. He goes back to full health whenever he collects Sand, from either a monster or object. Also, his Daggertail has a different control scheme for speed kills, in which the player repeatedly presses the attack button to make him saw off the heads of his victims (or strangle them if blood effects are disabled) with this weapon. The Prince will turn back to normal upon stepping into water, which cannot be avoided.
 Throughout the game, the Prince can find up to six branching side routes to earn health upgrades, as well as earn sand credits to unlock concept art by collecting sand charges, destroying sand chests and disabling sand gates throughout the city. The Prince can only recover health by drinking water from certain areas or at save fountains, but can also fully recover health when changing to and from the Dark Prince. If the Prince or Dark Prince dies from losing all health, a chariot accident or a fatal fall and the player is unable or unwilling to use the Dagger's recall power to reverse his demise, play continues from either the last save fountain he used or checkpoint he passed, with a few of the latter present between most save fountains.
 The PlayStation Portable version of the 2007 port, Rival Swords, expands the single-player mode by adding a few more chariot sequences and requiring the player to complete an obstacle course inside a sand gate to disable it. Also exclusive to this version is a local wireless 2-player racing mode that pits the Prince against a separated Dark Prince in foot races that demand skilled platforming and feature multiple routes and traps that can be activated by the opponent.
 The game is set after the events of Prince of Persia: Warrior Within, in which the Prince kills the Dahaka, saves Kaileena and prevents the Sands of Time from being created. Unlike the previous games, the story is narrated by Kaileena. The Prince's actions alter the timeline of events that took place before that point. In the original timeline, the Vizier and Maharajah traveled to the Island of Time and found an hourglass filled with the Sands of Time. In the modified timeline, they find the hourglass empty. Since the Vizier never released the Sands of Time and fought the Prince, he is still alive at the beginning of this game. As a result, Farah, who helped the Prince during the events for Sands of Time, has never met the Prince.
 As the Prince and Kaileena return to the city of Babylon, they find it ravaged by war. Their ship is attacked and destroyed, and they wash ashore. The Prince awakens and watches as enemy soldiers take Kaileena away. The Prince fights his way into the palace and confronts the Vizier, who kills Kaileena with the Dagger of Time, unleashing the Sands again. The Vizier then impales himself with it and makes himself immortal. The Prince is also affected, having a whip-like weapon known as a Daggertail embedded in his skin when the Sands infect the wound. However, in the confusion following the release of the Sands, the Vizier throws the Dagger aside and the Prince manages to steal it before the Sands infect him completely.
 The Prince falls into the sewers and gets carried to the outskirts of Babylon. As he travels through the city once again to kill the Vizier, he finds that the infection caused by the Sands of Time is affecting his mind, giving rise to an alter ego called the Dark Prince, manifested by a voice within. The Dark Prince is cold, cruel, arrogant and sarcastic; he attempts to convince the Prince that he should strive to serve only himself, using his vengeance as a catalyst for his other emotions. On many occasions, the Dark Prince seizes control of the Prince's body and the Prince is fully transformed into a hybrid sand monster with abilities that allow the Prince to pass otherwise insurmountable obstacles. The Prince makes efforts to keep his transformation a secret to everyone, most evident when he is forced to flee into the sewers when he begins to transform shortly after people witness his victory over the hulking Klompa, a general of the Vizier, at the arena where they were imprisoned.
 Later, the Prince encounters Farah, who is surprised that the Prince knows her name. Despite this, the pair begin to grow an entirely new romance together, but it does not hold after the Dark Prince's influence causes Farah to question his character. After Farah sets out to rescue women at a brothel and the Prince briefly parts to defeat Mahasti, another trusted general of the Vizier, Farah ends up discovering the Prince transformed into Dark Prince not long after he kills Mahasti, and her distrust of him comes to a head. She tries to stay away from him and the Prince continues into the city alone.
 Realizing the negative impact the Dark Prince's corruption is having on his relationship with Farah, the Prince resolves to change his attitude and begins to ignore the Dark Prince. He resolves to fight against the suffering of his people, which the Dark Prince had always spoken against. With the occasional help of the Dark Prince's powers, the Prince gets to the royal workshop and uses a statue of his father to smash a way out for people trapped in a fire, including the old man in Warrior Within, who now expresses hope that the Prince can save his empire after initially doubting his ability to change fate. The Prince then chases and fights two more of the Vizier's generals, the Twin Warriors who are armed with a sword and an axe respectively. The Prince kills the sword-wielding Twin Warrior while Farah returns to finish off the axe-wielding one. They are then cornered by the Vizier's sand army, but are saved by the rescued citizens of Babylon, mobilizing an unexpected army. They cut an opening through the enemy forces to help the two heroes escape.
 They eventually reunite at the palace entrance, where the Prince apologizes to Farah for his past arrogant and reckless attitude under the Dark Prince's influence. The Prince then repairs an elevator to bring the two to the palace's hanging gardens. Deeper into the gardens, the Vizier captures Farah and casts the Prince into an ancient well, where the long silent Dark Prince emerges once again and tries to take permanent control. The Prince resists the power, driving slowly deeper into the well looking for an escape, but he slowly weakens. At the bottom of the well, the Prince stumbles upon the dead body of his father Sharaman. He mourns for him, picking up his father's sword and accepting the consequences of what he has done to finally suppress the Dark Prince's ability to control his body. With a new resolve to set things right, the Prince fights his way underground and back into the palace halls, before ascending its massive tower to finally face the Vizier and free Farah.
 At the top of the palace's tower, the Prince confronts and kills the Vizier with the Dagger of Time. The Sands are released from the Vizier and his soldiers, who die. Seeing this, the people of Babylon rejoice. The Sands take the shape of Kaileena who cures the Prince's infection and destroys the Dagger of Time. She tells him that this world wasn't meant for her but there will be other worlds for her where she will find her place. She also tells the Prince that his journey is at an end and then disappears. As the Prince finds Sharaman's crown, the Dark Prince takes it and tells him that whatever the Prince owns will be rightfully his and lures the Prince into his mind, where the two struggle until the Prince abandons his shadow with the help of Farah's voice. The unconscious Prince is woken up by Farah. The game ends with her asking how the Prince knows her name and the Prince answers by beginning to retell a story about his first experience with the Sands of Time in Prince of Persia: The Sands of Time.
 While the gameplay additions of Warrior Within met with praise when the game released in 2004, its aesthetic changes were met with a polarised response. Many players requested a return to a Persian style for the music and the incorporation of original heroine Farah. Production on The Two Thrones began in 2004 at Ubisoft Casablanca, starting in parallel with Ubisoft Montreal finishing work on Warrior Within; the Ubisoft team had always envisioned The Sands of Time narrative as a trilogy following the Prince's growth as a character. During early phases, it was alternately known under the working titles Prince of Persia 3 and Prince of Persia: Kindred Blades, the latter referring to the Dark Prince. Different staff later cited poor technical performance and its dark tone as reasons why production was restarted at Ubisoft Montreal. An Ubisoft Casablanca staff member blamed unspecified "internal issues" for the project's change to Montreal. Ubisoft Casablanca retained credit for pre-production, and was attributed for the remaining aesthetic design. The final production time at Ubisoft Montreal was estimated by level artist Erwan Davisseau at nine months, the shortest production time out of the three Sands of Time titles and the most stressful for the team.
 Much of the gameplay was redesigned from the Casablanca prototype, though climbing between two parallel walls and the associated stealth kill was retained in the final game. The free-form combat style introduced in Warrior Within was retained, with some refinements and additions. The Speed Kill was intended as the new gameplay twist to make The Two Thrones stand out from both its predecessors and other games of its genre on the market, along with the chariot sections. A dropped gameplay concept was a "bloodlust" state that could trigger in combat and distort the Prince's vision, but test players found it obscured their objective and made playing the game too difficult. The enemy AI was tweaked and expanded to match the Prince's expanded move set.
 Another addition was the Dark Prince, described as the negative aspects of the Prince given a will and form of their own. The aim was to present players with a scenario where the Prince is confronted with the Sands' corruption first hand after seeing it in others during previous games. While the Dark Prince was teased during the canon ending of Warrior Within, the team were still unsure what the character would be, with him going through a number of aesthetic and character changes during production. The Dark Prince character was influenced by unspecified elements of Islamic mythology. The character also acted as a homage to a similar entity in Prince of Persia 2: The Shadow and the Flame. The Dark Prince's health draining continuously was a contentious topic during production, eventually coming down to an "executive decision" with the acknowledgement that some players would find those sequences frustrating. The shift between the Prince and Dark Prince was going to be player controlled, but the PS2 lacked the memory capacity for this function, so the transformation was limited to being story-related.
 The action drew inspiration from Hollywood and Asian action movies. No motion capture was used, with character animations being created by the animation team. The artistic style of The Two Thrones was based on research photographs taken by the team in Morocco, with the building design based on Islamic architecture and "iconoclastic" art from the region. This approach was partially inspired by its early development at Ubisoft Casablanca. The style of architecture, with different layers of habitation and flat roofs, gave the team more options for creating traversal points, in addition to making gameplay less claustrophobic by mostly moving out of the enclosed spaces of earlier entries. The Prince was portrayed as a mature warrior able to hold his own, with his appearance roughened using scars and his Sands infection being designed to appear like a "living wound" more than a tattoo.
 Warrior Within writers Corey May and Dooma Wendschuh returned to script The Two Thrones. The initial story was more complicated, with the team leads pushing for a simpler story which could be told within the game's production schedule; part of the simplification was the removal of the time travel elements of Warrior Within and a focus on the Prince's character. The "twists and turns" in the plot came from character growth rather than plot development, with the storyline focusing on the Prince's struggle with his dark side. Early promotional material had the Prince captured by Babylon's forces and Kaileena sacrificing herself to save him, granting him powers related to the Sands. The final confrontation with the Dark Prince was originally going to be physical, but inspired by mind-based conflicts in movies including Fight Club (1999) and Spider-Man (2002), the confrontation was shifted to a mental realm which could be created within time and budget. The final scene where the Prince walks away from his dark side rather than fighting or accepting him was intended to show the character's maturity. Due to the tight production schedule at Ubisoft Montreal, story cuts and changes were made very early, with the team's experience from the first two games allowing them to easily focus on key story sections to animate with cutscenes.
 Inon Zur, composer of the cinematic soundtrack for Warrior Within, returned as lead composer for The Two Thrones, collaborating with original composer Stuart Chatwood. The score was performed by the Hollywood Studio Symphony Orchestra. Compared to earlier entries which had prominent contemporary elements, the soundtrack made use of more "eastern elements" and had a more orchestral style. The sound design was meant to be immersive and realistic.
 Voice recording for The Two Thrones was finished in the summer of 2005. Yuri Lowenthal returned to voice the Prince due to fan demand. The Prince's actor in Warrior Within Robin Atkin Downes was originally announced as the voice of the Dark Prince, but in the final release the character is voiced by Rick Miller. Miller received the role through the game's voice director Simon Peacock, who was a friend. As his first video game role, Miller found it challenging due to the need to record effort and death sounds. While Farah was voiced by Joanna Wasick in The Sands of Time, in The Two Thrones she is voiced by Helen King. King, who knew the fan liking for the character, was given sketches of her to inform her performance. While King recorded her voice lines in Montreal where the development studio was based, Lowenthall recorded his lines in Los Angeles.
 The Two Thrones was announced in May 2005. The announcement trailer was created by a third-party CGI studio based on assets and concepts given to them for The Two Thrones; while most of the story elements were set, several elements including the Prince's appearance and Kaileena's role were in flux.
 By the end of December 2005, sales of The Two Thrones had surpassed 1.5 million copies. The game received a "Gold" sales award from the Entertainment and Leisure Software Publishers Association (ELSPA), indicating sales of at least 200,000 copies in the United Kingdom.
 Two Thrones and Rival Swords received mixed to positive reviews, with the original release deemed slightly superior over its re-release. GameRankings and Metacritic gave the game a score of 86.45% and 85 out of 100 for the PlayStation 2 version; 86.35% and 85 out of 100 for the Xbox version; 85.25% and 84 out of 100 for the GameCube version; 82.81% and 85 out of 100 for the PC version; 82.40% for the mobile version; 71.22% and 70 out of 100 for the Wii version; and 70.44% and 74 out of 100 for the PSP version.
 IGN gave the PC version 9 out of 10, praising the story, characters, graphics, music and gameplay. GameSpy gave the original Two Thrones release four stars for the PC version, and noted the graphics as more detailed and sharper compared to console versions. GameSpy graded Rival Swords a half-star lower. GameSpot gave the PC version 8.4 out of 10.
 Non video-game publications gave the game some positive reviews. The A.V. Club gave the game an A− and commended the game's controls and design. Maxim gave it a score of eight out of ten, despite noting some similarities regarding gameplay elements from other franchises like Splinter Cell and God of War. The Times gave it a favorable review, praising the gameplay and graphics, but was critical to some parts of the game which deemed it frustrating. The Sydney Morning Herald also gave it four stars out of five and praised Speed Kill system. Detroit Free Press gave the PS2 version three stars out of four and commended the combat system and Speed Kill stealth attack. Charles Herold of The New York Times was less favorable to the game.
 During the 9th Annual Interactive Achievement Awards, the Academy of Interactive Arts & Sciences nominated The Two Thrones for "Action/Adventure Game of the Year", "Outstanding Achievement in Animation", and "Outstanding Character Performance - Female".
 Aspects of the Dark Prince character have appeared in the film adaptation of Prince of Persia: The Sands of Time, such as his signature Daggertail being wielded by an enemy assassin. Two unlockable cosmetics for the Wii version of Prince of Persia: The Forgotten Sands, a tie-in game used to promote the film, are inspired by Two Thrones: a weapon skin resembling the king's sword acquired near the end of Two Thrones and a costume inspired by the Dark Prince. The Prince's normal appearance in Two Thrones is also a costume for the Nintendo DS version of The Forgotten Sands.