After Nami, Zoro, Sanji and Chopper entered the courthouse to get to its roof, where Luffy was already, Nami, Zoro and Chopper were stopped by Judge Baskerville. There was no way the latter was going to allow a couple of pirates to just come into Enie’s lobby to free someone who was about to be taken to the Gate of Justice. He summarily condemned them and was going to defeat them.
Before Zoro could attack him, Zambai and his troop interfered. They wanted to take care of the judge, because Zoro should free Robin and Franky as soon as possible. When Paulie arrived at the courthouse, he and Zambai confronted the judge.
After Paulie attacked him with Pipe Hitch Knifes and Zambai with a sword to simply cut him up, they find that Baskerville is actually made up of three judges, one standing in the middle and the other two each sitting on one leg. Before they could launch any more attacks, the three judges were simply run over by the incoming Rocketman, which the Straw Hats used to get to the Justice Tower. The fight was over as a result.