I Fought the Law

 is a quest in Fallout: New Vegas.

Quick walkthrough
Talk to Eddie and ask if there is anything to do. He will tell you that he wants you to deal with Chavez, another convict that has set up camp south of the NCR Correctional Facility. Kill him or convince him to leave (30 Speech). Report back to Eddie and get your assignment to deal with a suspicious merchant near Jean Sky Diving. Kill him, or convince him to leave (6 INT or 30 Speech). Report back to Eddie and get your final task to find out about the NCR's plans for the prison. Johnson Nash in Primm has the information you need (100 caps or 30 Barter or 30 Speech). You can also pickpocket the plans off of Lt. Hayes on the NCR side of Primm. To finish the quest, you can either bring the information back to Eddie, and will end up in the middle of an NCR assault on the prison or tell Lt. Hayes you want to help the NCR assault the prison, and aid (or sit by and watch) and NCR assault on the prison.

Detailed walkthrough
This quest is given by Eddie in the New California Republic Correctional Facility Administration building. He's the man sitting behind the desk on the second floor, surrounded by guards. Talking to him and asking how you can help out is all that is required to start this quest.
 * If you acquired a hostile/KoS reputation with the Powder Gangers in Ghost Town Gunfight, you will be unable to talk to Eddie to receive this quest. Completing the Nipton quest, Booted may provide a sufficient boost to your faction reputation, provided you're not "Vilified."

The first task you'll be given is to "take care" of a Powder Ganger named Chavez, who Eddie believes is setting up his own crew without permission. He is located at Powder Ganger Camp South, which is just south of the prison. You can either convince him to "move on" with 30 Speech skill, or kill him. Talking to him without being able to pass the speech skill will result in combat. Killing him (and/or the other Powder Gangers with him) won't cause any reputation loss with the Powder Gangers, and interestingly, his "crew" won't turn hostile if you kill Chavez in front of them. Whichever way you decide to do it, return to Eddie and let him know Chavez is handled.

The second task is to "deal with" a suspicious merchant over at Jean Sky Diving. If you talk to him, you can find out that he's actually a bounty hunter with 6 INT or 30 Speech. You can then end the conversation and report back to Eddie, or try to shake him down for a "toll" (30 Speech required). You can also "deal" with him at any point by killing him for no karma loss. Report back to Eddie.

Finally, you'll be asked to find out about the NCR's plans for the prison. Head to Primm and seek out either Johnson Nash or Lt. Hayes. Nash will cough up the information for 100 caps (50 with a Barter check of 30, or for free with a Speech check of 30). Hayes will only tell you that military orders are classified, unless you already know - either by pickpocketing the "Military orders" off him, and/or by getting the information from Nash first. Once you have the information, you can either report back to Eddie, or betray Eddie to Lt. Hayes, and help the NCR take back the prison.

If you report back to Eddie, he'll reward you with 1 Buffout, 1 Psycho, 1 Mentats, 100 caps, 200 XP and some Powder Gangers fame. He'll say that the NCR is already here, and tell you to feel free to kill some of them on the way out. As soon as you exit the building, the assault will begin, and NCR troopers pour into the facility and attack. You won't lose reputation with the NCR for informing on them; however, all the soldiers assaulting the base will be hostile to you, which will likely cause NCR reputation loss as a result of shooting back. Alternately, if you change into NCR Armor before exiting the building, the NCR invaders will be neutral, but the Powder Gangers will be hostile.

If you instead choose to betray Eddie to the NCR, you can choose the dialog path with Lt. Hayes where you ask to help in the assault. He'll tell you to rendezvous with Sergeant Lee, located just to the south east of the prison (on a hill, approximately in line between Powder Ganger Camp South and the prison). Once you initiate dialog with him, he'll give you a short "briefing," and the assault will begin. The quest will end once Eddie is dead, but as the Powder Gangers will rush out into the courtyard for the battle, Eddie will most likely be one of the last Powder Gangers alive anyway. You'll be awarded 300 XP for completing the quest, and gain reputation with the NCR.

Lee may mumble something about reporting back to Lt. Hayes after the quest has finished, but he will be gone from the NCR camp at Primm. You may run into him later at Camp Forlorn Hope where he has been apparently banished for all the whining about being shorthanded. He must be shell shocked because his dialogs still reflect his being in charge over in Pimm.

Bugs

 * Luring Chavez outside of his camp then killing him is known to cause him to respawn in camp if the player attacks without talking to him.
 * Even if you successfully complete the siege on the prison and get NCR back in control Mr. New Vegas will still say the siege failed on Radio New Vegas.
 * Even after you complete the siege on the prison and kill Eddie, in the ending-story (after you've finished the game) it will still say that the facility was never retaken by the NCR.
 * When assisting the NCR, the NCR troops will happily rush the administration building, ignoring the cell blocks and visitor center. In turn, the Powder Gangers in the Cell Blocks and the Visitor Center may not exit during the assault, requiring the player to manually clear them out.
 * After helping retake the Correctional Facility it was suggested by Sgt. Lee to go back to Primm to talk to Lieutenant Hayes, but Lt. Hayes will not be in Primm. Hayes begins walking to Camp Forlorn Hope upon mission completion.

Behind the scenes

 * This quest is a reference to the song of the same name by Sonny Curtis and The Crickets, later famously covered by The Bobby Fuller Four and The Clash. In the Dead Kennedys' version of the song the lyrics were changed to "I Fought the Law and I Won" rather than the typical "I Fought the Law and the Law Won".