This is how Twilight betrays Nightmare Moon goes in My Little Pony: The Revenge of Nightmare Moon.
[Nightmare Moon stands over a weakened Luna]
Nightmare Moon: Well, Luna. Looks like I've already won.
Princess Luna: You can't win.
Nightmare Moon: Oh, yes I can.
Princess Luna: You can't.
Nightmare Moon: And it was all thanks to Twilight.
Twilight Sparkle: No, Nightmare. This time, I've won.
Nightmare Moon: What?!
Twilight Sparkle: With you power, I could become ruler of all Equestria.
Nightmare Moon: I am the ruler of the night.
Twilight Sparkle: Not anymore.
[Twilight absorbs Nightmare into her horn and transforms, becoming Nightmare Sparkle]