I Fought the Law

 is a side quest in Fallout: New Vegas.

Quick walkthrough

 * Talk to Eddie and ask if he has any work.
 * Kill or convince Chavez to leave.
 * Report back to Eddie and get your assignment.
 * Deal with a suspicious merchant near Jean Sky Diving.
 * Report back to Eddie and get your final task for the quest.

Detailed walkthrough
This quest is given by Eddie at the New California Republic Correctional Facility in the Administration building. He's the man sitting behind the desk on the second floor, surrounded by powder ganger 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 because the Powder Gangers will be hostile upon your entrance. Completing the Nipton quest, Booted may provide a sufficient boost to your faction reputation, provided you're not "Vilified." If the Powder Gangers are hostile still, you can talk to Eddie by using a stealth boy outside the entrance and sneaking all the way to Eddie.  Stand up and immediately talk to Eddie and the quest can be initiated.  A stealth boy will be required each time you go back to talk to Eddie until the quest ends with the NCR confrontation. It's also possible to acquire Powder Gang simple outfit or any other Powder Gangers outfits(Also including Powder Gang guard armor) to disguise yourself and infiltrate the camp, then take out everybody besides Eddie in the Administration Building with a silenced weapon. Once only Eddie is left, it's advised you save and walk up and talk to him before he sees through your disguise. Once done talking get out of there as fast as possible again.

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" may not 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 traveling 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). The bounty hunter may attack you even after you convince him to leave, even if you are not dressed as a Powder Ganger. 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 caps if you have 30 Barter, or for free if you have 30 Speech). 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 him 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 (only if you kill some). Alternately, if you change into NCR Armor before exiting the building, the NCR invaders will be neutral, but some Powder Gangers will be hostile.

If Powder Gangers defeat the attackers you can speak with Eddie who will thank you. You will gain reputation.

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. The NCR reputation is gained by speaking with Lee after Eddie dies. If Lee dies during the assault, you won't gain NCR reputation.

Lee may mumble something about reporting back to Lt. Hayes after the quest has finished but, if My Kind of Town has already been completed, he will be gone from the NCR camp at Primm. You may run into him later at Camp Forlorn Hope. It is possible that Hayes and some of the troops under his command were sent to the Hope, and is why some troops at Forlorn Hope say that they got reinforced by troops from Primm.

Bugs

 * Completion of this quest in favor of the NCR will not register the proper result. Even though you gain the fame for success, Mr. New Vegas will report the mission as a failure, as will the ending narration.
 * Sgt. Lee may freeze on the steps to the admin building and will not finish dialogue - thus preventing NCR fame. Shooting weapon out of his hand (used Single Shotgun, others may work) which will turn Lee hostile but then holstering weapon immediately which will return Lee to turn friendly will unfreeze him.

Behind the scenes

 * This quest is a reference to the song of the same name by Sonny Curtis & the Crickets, more famously covered by the Bobby Fuller Four in 1965.