What's the most justified betrayal in science fiction or fantasy?S

Nobody likes a turncoat — but sometimes there's a really good reason. Sometimes you have to kidnap your best friend's baby, or give away your friends' plans to the enemy, because it's for the best. Who has the absolute best justification for betraying his or her friends?

Please include a picture or clip of this traitor, and mention the name of the series he or she comes from. Thanks!

Top image: Wreck-It Ralph.