Riku-Ansem

Riku-Ansem is the form that Riku takes to capture Roxas at the request of DiZ to awaken Sora and restore his power. Roxas was overpowering Riku during their battle, but Riku was determined not to lose the Nobody, so removed his blindfold and revealed the dark power of Xehanort's Heartless that he had been hiding within him. He succeeds then in defeating Roxas and takes him away to where Organization XIII cannot find him.

Riku takes this form at the end of Kingdom Hearts 358/2 Days and continues to remain in this form throughout Kingdom Hearts II. In this form, he appears identical to Xehanort's Heartless (other than his clothing), and even refers to himself as Ansem. However, those who truly know him can sense the Riku behind the appearance, as witnessed when Sora recognizes him in the Land of Dragons. Naminé eventually reveals his true identity to Kairi, who then tells it to Sora, Donald, and Goofy.

After Sora and company catch up with Ansem the Wise, the Kingdom Hearts Encoder the latter was attempting to use to turn Kingdom Hearts into data backfires and explodes. During the explosion, Riku is transformed back into his normal form. It can be assumed that the explosion rids Riku of the presence of Xehanort's Heartless forever.

Abilities
While in Riku-Ansem form, Riku gains complete control over the dark powers of Xehanort's Heartless. He can levitate, summon the Guardian Heartless, teleport, and expel bursts of dark energy (though this is only shown when he actually transforms). He also gains his Dark Firaga ability from his Dark Mode, that carries over to his normal form when he loses this, as well as a Dark Shield ability. He can also open and use Corridors of Darkness without fear.

However, when the Kingdom Hearts Encoder exploded and he was reverted out of this form, his heart was no longer tainted with darkness, so he could no longer use many of the abilities of his Riku-Ansem mode (as revealed when they attempted to leave the World That Never Was and Riku failed to open a Corridor of Darkness).

Kingdom Hearts II
Mysterious wielder of the darkness.
 * Part I - Ansem

What could his true purpose be?

The form Sora's longtime friend Riku chose.
 * Part II - Riku

''Though Xehanort tried to control Riku from within, Riku's heart proved stronger. But the only way to wield darkness fully was to become it.''

''Riku began calling himself "Ansem", perhaps as a sign of resolve. He would live in darkness if that's what it took to wake Sora.''