I Did What I Had to Do

""I'm sorry if you don't like my methods, but I do what I have to do.""

- Senna Wales, Enter the Enchanted

Sometimes good people have to do bad things because if they don't, worse things will happen. At its heart, this is a post-facto justification for morally questionable actions presented to those who would question the necessity or rightness of said actions. Perhaps The Hero has saved the villain, or surrendered the macguffin to save a hostage, or abandoned innocents/friends to their fate to save others. Or the Noble Demon has saved The Hero while just passing through. Or the Anti Hero has shot the dog. Their comrades are baffled, stunned, and angered. They ask "What Were You Thinking", and exclaim "What the Hell Hero"

The questioned character turns to them and says just one thing: "I Did What I Had to Do." And nothing else.

The character may later be somewhat humanized by showing that he regards it as Dirty Business, or giving him Bad Dreams, or Drowning My Sorrows, but he may not, and other shows of guilt, grief, or weakness are very unlikely. (Nastier sorts may express such sentiment only in the context of self-pity: their grief is that they were the ones who had to do such horrible things, or that no one else understands why it was necessary.)

This is also used sometimes as an explanation for Lawful Neutral or Lawful Stupid actions. Contrast It Seemed Like a Good Idea At The Time, which does the same as in this case, but for Chaotic Neutral or Chaotic Stupid actions. Often a plays a part in the weight of the Chains Of Commanding.

Anime and Manga

 * Death Note has plenty of this trope, and from many characters too - Light above all, but also much from L, and a fair bit from Near, Mello and even Light's dad - although certainly not always sincerely so.
 * Hughes Gouli from Overman King Gainer belief in Exodus is so much that he states that he will do anything so that they can reach Yapan. During an attack that causes people's thoughts to be broadcast he reveals to Sara that.
 * Neptune and Uranus from Bishoujo Senshi Sailor Moon (seasons S, Stars and the SuperS TV special) consistently fail to learn from their mistakes and are willing to sacrifice lives - both innocent civilians and their own fellow soldiers - on the basis that the end (destroying the enemy) automatically justifies the means. Given that in the realm of Sailormoon, what consistently defeats the villains is the power of unconditional love and not ruthless strategy, their failure to adjust to her strategy (which actually WORKS) marks them out for the Stupid Sacrifice category. Also, see end of SailorStars for a classic example of this trope dovetailing with Nice Job Breaking It Hero.
 * from Naruto practically embodies this trope, though it's a long time before this is revealed.
 * Lelouch from Code Geass when
 * There's also  You don't take chances with those people. Even though what Lelouch and  do is considered by most, if not all, of the people who have half an idea on what happened as disgusting, you simply don't want to risk that.
 * Though, rather ironically, none of those people who think that it was disgusting realise that it was a  They then   using the same reasoning.
 * More or less King's justification for having turned Demon Card into a criminal orginization in Rave Master
 * There is a lot of this from the villains in Tengen Toppa Gurren Lagann.
 * Windaria Alan's justification for
 * In Saint Beast, Zeus considers killing the old gods as regrettable but necessary action.
 * Bleach has Mayrui . Yamamoto is irritated Mayuri did so without consulting him, but Mayuri replies it was necessary immediately, not after getting approval through the Celestial Bureaucracy.
 * Bleach has Mayrui . Yamamoto is irritated Mayuri did so without consulting him, but Mayuri replies it was necessary immediately, not after getting approval through the Celestial Bureaucracy.

Comic Books

 * In The DCU, this is Amanda Waller's raison d'être.
 * Waller is odd in that she has a tendency to surround herself with idealists in an attempt to curb her pragmatic tendencies. When she (invariably) alienates these people, she REALLY starts to fall into this trope.
 * Marvel Comics's Cable might as well have this monogrammed on his towels as as often as he says it in his early appearances.
 * Magog from Kingdom Come uses this one too, which isn't surprising as he was inspired by Cable.
 * Wonder Woman ends up having to say this a lot after killing Mind Controller Maxwell Lords (with the whole thing recorded and broadcast to boot), who was controlling Superman (and who could've killed everyone present in the time it took to come up with a better plan). The whole thing sets off the Crisis Crossover, Infinite Crisis.
 * This is Batman's tacit justification for every time the Justice League finds out his plans to take them down should it be needed. Interesting because Batman helps undoing them anyway. He also encourages this state of mind in his protégés, especially Tim (among others, in the form of a Dangerous Sixteenth Birthday worthy of the greatest Manipulative Bastards).
 * In The Long Halloween, Harvey Dent says that he did what needed to be done when he.
 * from Watchmen killed millions to save billions.
 * Cyclops has spent the last decade giving up everything he believed in, from his own moral code to his own happiness and the relationship between himself and his friends, resulting in many supervillains and psychopaths being put down, causing him to be compared to Magneto, but all so he could keep the last of his kind from extinction.

Fanfiction

 * The North Korean Digidestined in most Digimon fanfics end up in situations like these, as do China's Digidestined. Their governments force them into doing various horrifying things and the kids rationalize it with 'I did what I had to do, because otherwise they'd kill my family'. Since they're kids, this comes across as more desperate and terrified than villainous. Fandom's is fairly good about not making them evil because their countries are - at least, fandom's good about that now. There's some Dead Fic from five or more years ago where they're straight up Complete Monster/For the Evulz lunatics.
 * This quote from the Villain Protagonist of the Mass Effect fanfic The Council Era says all that is needed to be said. "I will pay for taking the low ground after I die, but there always has to be someone who is willing to make such a sacrifice, for the sake of something far greater than themselves. It's part of the order of things." Keep in mind that his "taking the low ground" was committing genocide. It is likely that in the second part of the storyline, when he's expected to decline further into Chaotic Evil, that he'll still try to use the I Did What I Had to Do card, even if his motivation becomes Despotism Justifies the Means.
 * This the reasoning of the Big Bad in The Man With No Name, as well as Zeke, the leader of a town plagued by Reavers when he blackmails the heroes into helping him.
 * Of all people, Helen Belden in Trixie Belden fanfic Ambiguous. She's not sure of the relationship between her son Mart and his friend Dan, both teenagers, but she recognizes that Mart has romantic feelings for him. Unwilling to suffer the reprecussions of losing her family's good reputation by having a bisexual son, she deliberately drives Dan away, which might have lead to him allowing himself to be captured by criminals.
 * Ace Combat: The Equestrian War has Black Star who, as told by Firefly via flashback, was ordered to prevent a possibly mutiny against the Griffin Kingdom. Believing that Firefly's parents would be behind it, he killed them. When the young filly asked him why he did, this is his reason.
 * The kicker? The rumor of their involvement and the whole mutiny thing were.

Film
"Stella: What did you do to yourself?
 * This is Felicity Shagwell's excuse for sleeping with Fat Bastard in the second Austin Powers movie.
 * Which turns Austin into a huge hypocrite, since he did the exact same thing with Alotta Fagina in the first movie, to Vanessa's dismay.
 * With Felicity, Austin's not so much bothered about the ethics as the physics.
 * Any Scifi horror movie where people who are infected by The Virus have to be killed or risk having them turn on the uninfected cast. Closely related to most zombie and werewolf movies. Contrast What Happened to Mommy.
 * Inverted in the first Resident Evil movie. The infectee even receives the cure... and still turns into a zombie at THE WORST POSSIBLE MOMENT.
 * Reversed in Star Trek III the Search For Spock: watching the Enterprise explode, Kirk asks, "What have I done?" to be told by McCoy: "What you had to do; what you always do: turn death into a fighting chance to live."
 * Another Star Trek example would be Star Trek VI the Undiscovered Country during the scene where Spock mindmelds with  against her will.
 * A light-hearted version in Running Scared (1986). The two cop heroes are in a hostage situation with a gunman who doesn't have any pants (long story). He orders them to take off their pants and give them to him so (a) he'll have a pair and (b) it will be harder for them to follow him. They do so. Later in the station house they're asked how they could give up their pants, and one of them says "We did what we had to do."
 * Professor Xavier, in almost all mediums he's appeared in now, frequently uses this trope to justify some of his more morally questionable actions. Specifically, in X-Men 3: The Last Stand he tells Wolverine he did what he had to do in suppressing Jean's powers and her violent Phoenix personality.
 * In 30 Days of Night, after

Eben: What I had to do."

"Lewis Protero: We did what we had to do. Islington. Enfield. I was there, I saw it all. Immigrants, Muslims, homosexuals, terrorists. Disease-ridden degenerates. They had to go."
 * Played straight to the letter by  of Watchmen who not only goes to ridiculous lengths to dupe the world into think they're under attack (and killing millions in the process), he also.
 * Featured prominently in the second of many speeches in V for Vendetta.
 * Featured prominently in the second of many speeches in V for Vendetta.

"Mal: I don't murder children.
 * In a more comical direction, the entire premise of John Waters' Serial Mom is a suburban woman who feels morally justified in offing people for Though funny, John Waters has stated that he feels very strongly about all these grievances (especially the last).
 * Carriers. In a world where there's an infectious virus that kills people, pretty much everyone is forced to kill people who are infected but not yet dead. On some occasions our 'heroes' kill some non-infected people when they refused to give up gas in their car. They needed this gas to survive.
 * The Operative in Serenity.

The Operative: I do...if I have to."

"Mathieu: Should France remain in Algeria? If your answer is "yes", then you must accept all the consequences."
 * Royce from Predators is willing to sacrifice his fellow humans and abandon the wounded in order to survive, and often invokes this trope when Isabelle calls him out for it.
 * In The Battle of Algiers Mathieu delivers a speech on this theme to the French press, justifying his use of torture in combating the Algerian insurgency.


 * In Dr. No, James Bond invokes the trope after he knifes a guard and Honey Ryder gives him the What the Hell Hero? treatment.

Literature
"Samuel: You idiot. What have you done?
 * In Captain's Fury, the First Lord Gaius Sextus has one of these moments when  He's forced to do this because
 * Inverted in Lois McMaster Bujold's Barrayar, newly-made Regent Aral Vorkosigan is faced with either upholding the rule of law, or sparing the life of a boy who accidentally killed someone in a duel--a crime punishable by death. He eventually chooses the law, but feels miserable about it. Even knowing that he Did What He...you get the idea...doesn't comfort him much.
 * It also leads directly to Aral's son being born with crippling birth defects, as collateral damage of an assassination attempt by the executed boy's older brother.
 * Robert Wingrove's Chung Kuo series
 * Subverted in Terry Pratchett's Night Watch, where Vetinari suggests that a monument be erected to the watchmen who died in the Glorious Revolution of May 25th, engraved with the phrase "They Did the Job They Had to Do." Vimes angrily replies, "No! They did the job they didn't have to do, and they died doing it, and you can't give them anything."
 * Colonel-Commissar Gaunt leaving Tanith to burn at the beginning of Warhammer 40000: Gaunts Ghosts.
 * Tanith could not have been saved no matter what he did. It is the act of not letting the Tanith soldiers stay behind and die for their planet that invokes this trope. He made them 'ghosts' because that is what he had to do as a loyal officer of the Imperium.
 * Raj Whitehall's computer mentor, a Well Intentioned Extremist if ever there was one, and his wife Suzette are always telling him this one in The General. To Raj's credit he never quite accepts it.
 * In Red Harvest by Dashiell Hammett, "a man's got to do what a man's got to do" is favorite phrase of Noonan the chief of police. Ironically he uses it any time he does something that would benefit him -- such as manipulating a witness to convince her that her husband's killer was the man he had a grudge against. The Continental Op repeats the phrase before searching a dead lawyer's pockets for potential blackmail materials.
 * World War Z had the Redekker Plan. Which is basically a strategy for using refugees as zombie bait while government forces regroup. Despite the horrific implication of the plan, The worlds governments used it anyway.... The plan arguably saved humanity.
 * In the Halo Expanded Universe novel Ghosts of Onyx the UNSC used and sacrificed HUNDREDS of little orphaned kids, refugees from planets devastated by the Covenant, as Laser guided Tyke Bombs. If it wasn't for this strategy the humans would have lost the war before Halo 3 rolled around.
 * This is also Dr. Catherine Halsey's excuse for creating the SPARTAN-IIs. This was actually considered worse than creation of SPARTAN-IIIs (the aforementioned orphans). 75 children were kidnapped from their families and replaced with flash clones (which swiftly die) and then goes about turning the children she'd taken into nothing more than killing machines. Do to this, she has the SPARTANS undergo experimental and highly-dangerous medical treatments that kills 30 and permanently disfigures 12. It should be noted that Halsey's guilt about this was quite considerable... to the point where she goes to the opposite extreme. In later books, she's willing to see Earth and most of humanity annihilated if it saves her SPARTANs. In the end it was justifiable, as one of them manages to end the war and saves the entire galaxy from either assimilation by the Flood or death via the Halo Array.
 * Used unsuccessfully by King Saul of Israel in The Bible. The situation is grim: The Philistines outnumber Israeli forces two to one and have superior technology. Friendly forces are being beaten back, and Samuel, God's designated priest, hasn't show up to ask for God's help with the battle. Saul waits a week for Samuel to show up and then performs the ritual himself. Just as Saul finishes wiping the animal blood off his hands, Samuel rides up.
 * Used unsuccessfully by King Saul of Israel in The Bible. The situation is grim: The Philistines outnumber Israeli forces two to one and have superior technology. Friendly forces are being beaten back, and Samuel, God's designated priest, hasn't show up to ask for God's help with the battle. Saul waits a week for Samuel to show up and then performs the ritual himself. Just as Saul finishes wiping the animal blood off his hands, Samuel rides up.

Saul: I Did What I Had to Do.

Samuel: You're fired."


 * Actually, Saul said "What the people wanted". So, he was fired for irresponsibility, though it didn't become official until the Amalekite episode (which was even worse and may have directly led to the Holocaust millennia later) and he stayed on the throne until, faced with humiliating defeat, he committed suicide when his armor-bearer refused on moral grounds to euthanize him.His successor disobeyed as well, but could at least pronounce the words "guilty as charged."
 * It should also be noted it sounds more like Samuel is an uncaring asshole. The Israelis were deserting the camp, supplies were running out, Samuel told Saul to make the sacrifice in a certain amount of time (but also to wait for him). If Saul waited, he could have run out of supplies, or had his army mutiny, or go out to fight on their own. It's more a case of Saul being the Butt Monkey and Woobie of Samuel's assholery. Samuel did have a point when he officially sacked Saul later on following the Amalekite episode, though Saul still stayed on the throne for the rest of his natural life, after which David (who was chosen to replace the fired king years earlier) was crowned the new king.
 * In Jim Butcher's Dresden Files novel Summer Knight, says that she must stop the interchange between the Summer and Winter Courts, and it's horrible but she didn't set the price.
 * In Changes this is what Harry does.
 * All of which he does to save.
 * Frankly,
 * In Ben Counter's Warhammer 40000 novel Chapter War, the Inquisitor Thaddeus lied to get aboard a Howling Griffons' ship. When they came to a head, and they try to imprison him, he kills one to escape. He once "would have never accepted the death of a good Imperial servant as a necessary evil. But he was much wiser now."
 * This is a major theme in the Wheel of Time  with the three male main characters forced to act progressively more brutal as their responsibility grows and the situation worsens. Includes such gems as using friends like pawns, executing friends, torture by way of dismemberment, allowing bad guys to enslave hundreds of women in order to secure a temporary military alliance, creating an army of superpowered men who will eventually go insane, and purposely destroying your own humanity in order to be up for the job of saving the world.
 * Inverted in that Rand's inability to kill any woman, even when she's a villain, causes his
 * The witch Senna Wales of Everworld, as mentioned above, occasionally says something to this effect to the other main characters in reference to her schemes, which often involve some poor sap being bewitched.
 * Brent Weeks' Night Angel Trilogy is full of these, usually from Logan. When  Logan flips a table, breaks a leg off and brutally smashes in the arms and legs of , who is slowly dying a torturous death on 'the wheel'. He then gives an ultimatum to the Laeknaught,shattering his "good boy" image. He also says this verbatim to Count Drake after he   to Terah Graesin.
 * In Hero by Perry Moore, Goran uses this exact phrase when Thom asks him how he got himself and his little brother out of their war-torn homeland. What makes it chilling is that that's all he says; we never find out what he actually did.
 * This is a running theme in David Drake's ''Hammers Slammers stories: in war, you can't keep your hands clean unless you want to lose. The Slammers are well aware of this. Some of the groups that hire them are shocked to find it out -- the hard way.
 * Mr. Sellars in Otherland, the Mysterious Informant for the good guys, is very much The Chessmaster and shamelessly manipulates people in order to advance his schemes, the most disturbing of whom is an innocent six-year old girl. In the end, his justifications ring hollow even to himself, especially once his dark secret is revealed and it turns out that his core motivation was entirely selfish.
 * Livia in I Claudius ruthlessly manipulates and kills family members and anyone else close to them to ensure her son becomes emperor and Rome does not return to being a Republic, convinced this is the only way for the city to remain great.
 * The Children Of The Star trilogy by Sylvia Engdahl meditates on this concept in detail.
 * Both Dumbledore and Snape from Harry Potter. Also implied when describing Crouch's decision to allow aurors to use the Unforgivable Curses during the first war with You-Know-Who. And Harry himself doesn't come away all squeaky clean in The Deathly Hallows either, throwing around Imperius-curses left and right. Perhaps his worst example of this trope is when he goes Crucio on the Carrows' arses (probably his first Unforgivable ever), to say nothing of how even the protagonists throw Unforgivables every which way but loose and any which way they can during their war against Voldemort.
 * When George shoots in Of Mice and Men. After, George is forced to shoot him so the other men don't. He does it in a way so  doesn't realise, which the other men would not have given the courtesy of doing.
 * In Death: Eve and Roarke have had to defend their actions more than once and they have even said this trope practically word for word to each other.
 * Discourses On Livy talks about how necessity must sometimes trump what is good for the sake of preserving liberty.
 * Discourses On Livy talks about how necessity must sometimes trump what is good for the sake of preserving liberty.

Live Action TV
"Alien captain: "You're stranding us three years from home! Why are you doing this?"
 * Law and Order Special Victims Unit: This has become something of a Catch Phrase for Elliot Stabler. In one episode, telling an informant "You do whatever you have to do" leads to a lot of trouble. In the Season 8 episode "Clock" when he tells Kathy, "I did what I had to do," she responds sarcastically, "Well, that's refreshing."
 * Jessica in episode 6 of Heroes: "I did what had to be done."
 * Versions of this are something of a staple on Farscape. Aeryn, John, Noranti, even Scorpius and Crais have reasons to say this at some point. Your Mileage May Vary on whether each individual event was actually the right thing to do - for example, Aeryn definitely had to, or the show would have been very short. Noranti   - not so good.
 * Captain Archer falls into this during the Xindi arc of Star Trek Enterprise. In the process of saving Earth, he  He himself notes that the justification is wearing a bit thin.

Captain Archer: "Because I have no choice! Energize!""

"Sisko: "People are dying out there, every day. Entire worlds are struggling for their freedom. And here I am still worrying about the finer points of morality!"
 * Basically the whole point of the Star Trek Deep Space Nine episode "In The Pale Moonlight', in which Captain Sisko recalled what he did to bring the Romulans into the war against the Dominion.

Sisko: "So... I lied. I cheated. I bribed men to cover the crimes of other men. I am an accessory to murder. But the most damning thing of all... I think I can live with it. And if I had to do it all over again, I would. Garak was right about one thing, a guilty conscience is a small price to pay for the safety of the Alpha Quadrant. So I will learn to live with it. Because I can live with it. I can live with it... Computer, erase that entire personal log.""

"Lore: "I Did What I Had to Do?" What kind of answer is that?!
 * Colonel Kira has the opinion towards her actions during the Cardassian occupation of Bajor. When attacked by a man, who turned out to have been a dry-cleaner who had been horribly disfigured by one of her explosives meant for a Gul, rather than ask for forgiveness she replies that, as far as she was concerned, all Cardassians on Bajor were part of the occupation, and if he didn't like it, he shouldn't have set foot on their world.*
 * In Star Trek the Next Generation, it is revealed that part of every Command Officer's duties is (similar to Real Life Captains) to put the safety of the ship first. This led to Troi ordering Geordi to his death to save the ship. Fortunately, it's just a hologram of him during a training simulation.
 * When Data, Lore, and Dr. Soong are all together for the first time, Lore confronts his father about being deconstructed.

Dr. Soong: The only one I can give you."

"Data: Is it not true that, had you refused to prosecute, Captain Louvois would have ruled summarily against me?
 * When Data has to defend his rights in The Measure Of A Man, Riker (ordered to act as the opposition) does some fairly horrible things, such as removing his hand and turning him off. Afterward (Data wins), Riker feels far too wretched to make this excuse for himself. Data, showing the human virtue of forgiveness, does it for him:

Riker: Yes.

Data: That action injured you, and saved me. I will not forget it."

"Giles: She couldn't take a human life. She's a hero, you see. She's not like us.
 * Buffy the Vampire Slayer: When Giles at the end of Season Five.

Ben: ... us?"

"I did what I had to."
 * Jack Bauer in 24 is more or less the personification of this trope. He spends much of the show torturing  people for the purposes of stopping the terrorists. Toward the end of Season 7, he admits that what he's doing often runs counter to the law, but when faced with situations in which innocent lives are threatened, he will do whatever is necessary to save those innocent lives and accept the consequences later.
 * Said about Once an Episode on House.
 * In Doctor Who, the head of Torchwood being led off to be converted into a Cyberman due to her own actions keeps repeating to herself, "I did my duty for queen and country. Oh God, I did my duty for queen and country!"
 * Which led to a rather moving case of Heroic Willpower by her later.
 * The Doctor usually busts out this defense with regards to the Time War that took place between the classic series and the revival. He committed genocide twice over -- he wiped out his entire race and destroyed his home planet -- in order to end the universe-threatening war and wipe out the Daleks . Mind you, saying that the Doctor feels bad about his actions is like saying that tsunamis are a bit soggy. That and the Episodes 'End of Time' revel he really did have to do it because the Time Lords had become just as dangerous to the universe as the Daleks.
 * In Torchwood's series 3 miniseries, titled Children of Earth, Captain Jack Harkness  Of course, this is following
 * This could practically be the motto of the 5,000 year old Anti Hero and sometime Trickster Mentor immortal Methos from Highlander the Series. While certainly not amoral, Methos has lived 5,000 years because almost nothing gets put ahead of the need to survive.
 * He's also willing to do pretty much whatever it takes to protect his friends, even from their own foolish idealism. For example, when Duncan MacLeod's chivalric ideals won't allow him to kill a rather evil woman he's defeated, after Duncan leaves, Methos walks up to her and introduces himself as "A man who was born long before the age of chivalry." Guess what happens next.
 * After the members of Angel Investigations ask Cordelia how she managed to convince Angelus to reveal what he knows about the Beast in "Soulless":

"Angel: What did you do?!
 * An episode later ("Calvary") Gunn gives this, word-for-word, as his justification for
 * A few episodes later ("Orpheus") Wesley says this almost exactly as his reasoning for allowing Faith to.
 * Then in "Inside Out", Darla's spirit while speaking to Connor uses these words explaining her suicide in order to allow him to live.
 * And then in "Peace Out", Angel uses it to defend his decision to.
 * In "Shells":

Wesley: What I had to!"

"Gus: I guess you were just doing what you had to do.
 * However, this is not a perfect example, as his actions were motivated by revenge rather than necessity. Angel owns this trope.
 * When Angel's reassuring Wesley after, he realizes aloud that Wesley's always been the one who does what needs to be done, even if it means he alone takes the blame for it. It's at that point that Angel's own lingering grudge against Wesley finally ends.
 * On Lost Eko is confronted by the Monster (probably), taking the form of his brother, urging him to confess his sins. He faces it and says that he did not sin, because he did only what he had to do to survive. The Monster does not agree with his analysis.
 * Ben says this verbatim about his purge of the DHARMA Initiative.
 * In an earlier episode, this is Sawyer's excuse for . He says he had to do it because Jack couldn't.
 * There's also a large number of things that John Locke did purely because it was "destiny" or because "the Island demanded it".
 * Invoked in a slightly more lighthearted manner (though surprisingly seriously, considering the show) in a season four episode of Psych: through a very complex situation, Shawn has to tell Juliet that he loves her during an investigation--when, in fact, he has no intention of dating her, and is seeing someone else.

Shawn: Yeah, the weird thing is...I think she was about to say it back to me.

Gus: I bet she was just playing along. Doing what she had to do."


 * Used, invoked, played straight, subverted, inverted, and basically all-around zig-zagged on Criminal Minds, where a character says this of themselves or someone else just about every third episode, with varying justification and effect.
 * Used by Queen Mab in Merlin. Given that she's fighting not only for her own survival, but the survival of Magic and all the species inextricably connected with it, she admittedly has a point.
 * Occasionally alluded to by Uther Pendragon in Merlin in regards to his persecution of magic users.
 * A strange inversion comes from Babylon 5: When Londo finds Vir drowning his sorrows after, Londo tries to calm him down a bit not by saying "You Did the Right Thing" but (more or less) "you did what you had to." Recognizing his own bitterness at not being innocent like Vir, Londo tells Vir, more or less, that he can't comfort him, but "it was necessary."
 * Delenn has to give a "I did what I had to do" justification to for her actions . She says, "We had to choose between the deaths of millions and the deaths of billions."
 * This is what Meredith says in the season 7 finale of Greys Anatomy regarding her decision to.
 * Livia in I Claudius killed off nearly her entire family, but claims it was all in the name of avoiding another bloody civil war like the one between Antony and Augustus.
 * Walter and Skyler White:
 * In the episode Blinking Red Light in The Mentalist, Jane gives this excuse to Lisbon for why he.

Machinima

 * Red vs. Blue: The excuse of the Director of Project Freelancer for performing his morally ambiguous experiments.
 * Half Life Full Life Consequences: John Freeman claims he "MUST DO WHAT HAS TOBE DONE",
 * "its a good day to do what has to be done by me and help my brother to defeat the enemys!"
 * The sequel is even subtitled "What Has Tobe Done."

Music
"I did what I had to do
 * A few lyrics to "My Way" go as thus:

And saw it through without exemption..."

Tabletop Games

 * Warhammer 40000. All of it... at least the "good guys". The bad guys just enjoy their work. The kicker? For the sake of surviving, they really DO have to do it.
 * Warhammer too. Burn down an entire village because of possible chaos taint? Had to be done. Burn the Witch definitely had to be done. And this is just the humans, the other 'good guy' races are just as bad.
 * Exalted from White Wolf Games has the Sidereal Exalted, who masterminded the Usurpation that overthrew and murdered the Solar Exalted rulers of the setting. The Solars of the First Age were rapidly becoming mad and wicked tyrants, and the Sidereals saw two options: a Million to One Chance to save Creation by redeeming them, or a near-certain chance to solve the problem by killing them all, destroy the magitech infrastructure of the First Age and save what they could of Creation. They chose the latter, and the Bronze Faction maintain that their actions were correct to this day and are still correct. Whether they're right is fuel for endless disagreement, Flame Wars and Natter.
 * Dungeons and Dragons had a version of this for PALADINS in the "Complete Scoundrel" 3.5e sourcebook: the Gray Guard Prestige Class, which basically allows the paladin to violate the code of conduct for the class with a minimal penalty if he does so in pursuit of a greater good.
 * There's a reason the Forsaken are called such -- because they killed their father deity when they saw that he was getting weak and was unable to hunt down the spirit entities that threatened primordial Earth. As a result, they pretty much dashed Paradise to pieces, alienated their mother deity for millennia, and earned the undying enmity of their cousins, the Pure.
 * The Hunters say this a lot, too. Living in the World of Darkness and fighting the eponymous darkness not only requires cast-iron balls, but all too often demands a willingness to accept innocent casualties as inevitable in the name of fighting a greater evil.
 * Urza in Magic the Gathering practically had this printed on a shirt. Let's put it this way: his plan to wreck the biomechanical hell of Phyrexia involved recruiting eight planeswalkers. One of said planeswalkers was a sociopathic murderer who Urza knew all along would try and kill the other planeswalkers; he let said murderer kill two, then hit the kill command for that murderer's powersuit and used his life energy to prime the bombs. While ranting about how everyone kept underestimating him, no less.
 * Firewall in Eclipse Phase do what they have to do. This doesn't make it any easier on their operatives when they have to shoot a child out of an airlock to keep him from infecting others with a virus that's raw Body Horror.
 * Firewall in Eclipse Phase do what they have to do. This doesn't make it any easier on their operatives when they have to shoot a child out of an airlock to keep him from infecting others with a virus that's raw Body Horror.

Theatre

 * Odysseus argues along these lines to Neoptolemus both for what they are about to do (abduct a man against his will), and for leaving said man stranded on the island in the first place in Philoctetes.

Video Games
"Rtas 'Vadum: "A Flood army, a Gravemind, has you in its sights - you barely survived a small contamination."
 * ''Aperture Science - We do what we must, because we can."
 * Advance Wars Dual-Strike has the player, as Jake, be presented with a choice: Either he can kill the Big Bad, who is draining the life force out of the entire planet in order to extend his own life, and has (presumably) killed millions if not billions of lives in doing so, or he can sit and watch as the villain wipes out all life on the planet to extend his own life just a little longer. Maybe this would trouble a normal kid, but Jake is a military officer who has just fought a war to get to this point, and has ordered the deaths of hundreds, if not tens of thousands of enemy soldiers and made decisions that inevitably lead to his own units' deaths. In fact, you are graded upon the efficiency with which you mow down your opponents and minimize sacrifices. If you, for some reason, decide not to save the world, Hawke will do it for you... you coward.
 * Cortana, in the final Cutscene of the original Halo, though it's clear from her tone of voice that she's trying to convince herself and the Master Chief, not stating her actual feelings.
 * In Halo 3, the Sangheili Shipmaster Rtas 'Vadum decides to completely incinerate a Flood-infected portion of Africa, a decision to which Fleet Admiral Lord Terrence Hood initially reacts with hostility, but he is forced to realize that there was nothing else to do.

Lord Hood: "And you, Shipmaster, just glassed half a continent! Maybe the Flood isn't all I should be worried about."

Rtas 'Vadum: "One single Flood spore can destroy a species. Were it not for the Arbiter's counsel, I would have glassed your entire planet!""

"Balak: You could have saved them. Who's the real terrorist here?
 * Used often in Assassin's Creed, during the personal conversations between Altair and his Templar victims. Actually said by both sides, with Altair explaining that he has to kill the Templars for the sake of the Holy Land, and the Templars justifying their own heinous crimes.
 * Subverted more humorously in Lost Odyssey; Jansen Friedh tells Queen Ming, "I had to do what I had to do back there," and then admits that what he "had to do" was pretty much "sit there and let you save me."
 * Mass Effect gives you the option to justify your actions this way several times, especially if you chose the Renegade path.
 * The DLC "Bring Down the Sky" really hammers this home, and also if you pick the renegade option, get the bad guy, then afterwards if you pick a paragon dialogue choice, Shepard says something along the lines of "If I have to see her face every night, I can live with that.". For me this acted as quite a powerful moment...
 * That is, of course, right after the villain calls you out:

Shepard: You. But you're dead. *gunshot*"

" : Had to be me. Someone else might have gotten it wrong."
 * Mordin claims this for . While he claims it's the best option he still feels horrendous guilt for his actions however.
 * In the DLC Lair of the Shadow Broker,
 * In The Arrival DLC after Shepard
 * In Mass Effect 3, you will hear the words "Those were desperate times." a lot when anyone mentions the Rachni War and the following Krogan Rebellion in the presence of Turians or Salarians.
 * Heroic Sacrifice at the Shroud (if you don't talk them out of it).


 * When confronting a batarian who accuses Shepard of terrorism because of his/her destruction of the Bahak system, Shepard admits that s/he felt (and still feels) great guilt about it but still claims that it needed to be done.
 * Red Alert 3 has the President of the United States say
 * Faldio from Valkyria Chronicles justifies his as needed to save Gallia. Unlike most examples of this trope, he felt guilty after he had a chance to think about his actions.
 * The Boss. Arguably others might count as well.
 * In Neverwinter Nights 2,  goes on and on and on about how he "did what he had to do".
 * Said word-for-word by Tyrande Whisperwind in War Craft 3: The Frozen Throne regarding the freeing of Illidan Stormrage. She does later suggest that she regrets this decision, though.
 * Also said word-for-word by Alexstrasza in World of Warcraft response to killing her brother Malygos to end the Nexus War after the raid defeats him. She then says that he had to be stopped, but he was once a hero, and she will mourn his loss.
 * In order to change his own destiny,  in Final Fantasy XIII.
 * In most of the Myst games, there is an antagonist who goes into a monologue like this, most notably Gehn at the end of Riven and at the end of Myst V.
 * In Tactics Ogre, if your player goes down the Law route,, this will be your response to people like  , who challenge your methods and cynical view.
 * In Dragon Age Origins, if the main character asks Alastair if the Grey Wardens are like heroes, Alastair responds that the Wardens do whatever is necessary, implying that that includes some pretty unheroic stuff. Depending on your decisions, a ruthless yet well-meaning warden may find themselves using this justification a lot.
 * uses this as justification for  in Dragon Age II.
 * King Logan of Fable 3. He was a ruthless tyrant who opressed his people and brutally exploited them to maximize the profits of his kingdom.
 * in Eien no Aselia uses this as a justification for his actions. He has to do what he has to do
 * In Phoenix Wright Ace Attorney, Lana Skye has this attitude about forging evidence to help convict serial killer Joe Darke..
 * By extension, in Apollo Justice just to find the truth largely because.
 * In Bastion, the kid needs to destroy the petrified remains of other children who were hit by the calamity to get to a warp gate.
 * In Metroid Other M, we learn that, when Samus was a federation soldier, Adam to ensure that everyone onboard the ship he was commanding didn't die. Later he sacrificed himself to.

Webcomics

 * Dr. Schlock from Sluggy Freelance lives and breathes this trope, always betraying someone or another in order to keep a different someone or another from killing him. Reaches its peak in this strip.
 * Also in 4U City.
 * Said verbatim by Anakin in this episode of Darths and Droids, after deliberately destroying Sebulba's pod (and possibly Sebulba) to win the pod race.
 * Krunch's comment to Cale on this page of Looking for Group.
 * While the most poignant example in the comic, not the first. Played seriously and then for laughs on this page.
 * Later Pella uses it after she This makes Cale unhappy because at that point she was the only member of his party he was sure would not use that excuse.
 * In Harkovast, Shogun views killing wounded, surrendering opponents as perfectly reasonable, and angrily defends this concept when questioned by the other characters.
 * In No Rest for The Wicked, when November wonders if there was another way, Red tells November that the woman was dead; she just killed the monster inhabiting her skin.

Web Original

 * The 6th episode of the TV Tropes original webseries Echo Chamber has Tom claim that, when he dumped his ex-girlfriend, he was just doing what he had to do.
 * PreGame Lobby parodies this trope... With a giant blue duck.
 * Survival of the Fittest villain Bobby Jacks' entire justification for 'playing the game'. (The full statement being: 'I Did What I Had to Do to survive')
 * An extreme example: The SCP Foundation's SCP-231 project. Pregnant girl of undetermined age carrying what appears to be some form of Cosmic Horror that, if birthed, will be The End of the World As We Know It. The only way to prevent the birth?  Yes, it is as bad as you think. No, the girl cannot be put out of her misery. No, the girl cannot be drugged into amnesia or unconsciousness. She has to be fully awake for the procedure to work. Yes, it is just as horrifying a prospect as you could imagine.

Western Animation
"Number 1: You do what you have to, and I'll do what I have to."
 * says this line verbatim in Batman Beyond. Of course,
 * An alternate version of Batman from Justice League uses five simple words as justification for an alternate Superman vapourising their version of Lex Luthor: "It had to be done." And then this act sets the heroes on a path to creating a world without war, crime, poverty, suffering and most importantly, freedom.
 * Kids Next Door:


 * In Avatar: The Last Airbender, this is used by Zuko twice; once in his second fight against Zhao to justify, and then again in season 3 to . It's pretty notable that while the first is said with utter conviction, the second time it's used it more or less fails to even convince Zuko himself.
 * This was Ultra Magnus' justification for creating Person of Mass Destruction Omega Supreme in Transformers Animated, showing that he was (and still is) willing to do nearly anything to end the war. Ratchet didn't agree.
 * Ironically, Ratchet says the exact same thing later when Omega questions the point of war. Then again, Omega was on the verge of dying, and Ratchet probably wanted o make him feel good in what could have been his last moments.
 * In the finale of Beast Machines Optimus, Rattrap, Cheetor and Botanica were barricaded inside Megatron's fortress while Megatron and his Vehicons were trying to get in, but were unable to as long as the shields were up. Stalemate. However, being separated from the soil meant Botanica (Rattrap's love interest) was losing her life energy. Rattrap opened a small hole in the shields in order to get Botanica out and back to the ground - which worked, but which Megatron immediately picked up on and used to destroy the base. Optimus and Cheetor flipped out at Rattrap, who used this as his justification.
 * Optimus ended up dropping the issue while noting that the shields would have failed sooner or later after the initial flip out.

Real Life

 * Ronald Reagan said, on the bombing of Libya in 1986, "Colonel Qadhafi is not only an enemy of the United States. His record of subversion and aggression against the neighboring States in Africa is well documented and well known. He has ordered the murder of fellow Libyans in countless countries. He has sanctioned acts of terror in Africa, Europe, and the Middle East, as well as the Western Hemisphere. Today we have done what we had to do. If necessary, we shall do it again."
 * And in 2011, we made true on his promise.
 * Harry Truman stood by his decision to use atomic bombs against Japan, saying "I knew what I was doing when I stopped the war... I have no regrets and, under the same circumstances, I would do it again." In private diaries, however, he expressed some regrets and uncertainty.
 * Paul Tibbets, the pilot of Enola Gay that dropped the bomb on Hiroshima said in 2005 that "If you give me the same circumstances, I'd do it again". Crew members of Enola Gay and Bockscar (the plane that dropped the bomb on Nagasaki) said similar things, except Robert Lewis, co-pilot of the Enola Gay, who had a My God What Have I Done moment.
 * This is actually the law whenever an aircraft of any stripe has an emergency. The commander of the craft is authorized to do what he has to do to minimize the harm and prevent catastrophe, and any property damage or deaths that happen as a result of this are legally just collateral damage.
 * Machiavelli wrote in The Prince that a Prince should not let his morals impede the running of a state. (In most academic circles The Prince is regarded as a satire. He also wrote about how a Republic and its citizens would be called upon to do what was necessary for the good of the Republic in Discourse On Livy.)
 * It could also be a matter of the Prince doing what has to be done...
 * And i think it really depends who 'most academic circles' are...
 * As with pilots, firefighters will try to minimize damage but if they have to break things in order to do the greater good, they can and will without hesitation. Someone parked in front of a fire hydrant? You'll see a hose running through the busted-out windows. Can't get close enough to the side of a burning building because there's a car dealership lot with a row of brand new cars in the way? Get a nearby bulldozer to plow a path through the cars.
 * There are morality tests that function on the standards of action vs inaction. The first situation proposed is that there is a plane with 100 passengers on that is going to crash, but the test-taker can prevent it by pushing a button. The button will kill 10 people instead. Those who opt to push the button would fall under this trope. The second situation is similar, but now there is also a lever. The lever will also prevent the plane from crashing, and it will only kill person: the test-taker. The answers are interesting, especially to the test-taker.
 * Emperor Augustus used this as the rule by which he ran his entire life. One wonders if he ever slept well at night, but it's hard to say Rome didn't benefit.
 * The famous quote "We had to destroy the village in order to save it" from a commander in the Vietnam War.