No, you did right. When you go through that portal, you're initially confronted by a bunch of prison "officials" who are out to give you summary justice. They'll all attack you, and Haer'dalis should not be around. The only character you should avoid attacking in any way is that little slave in the upper right portion of the battlezone. He can give you some very useful clues about how to survive, and secretly attack the thugs who run the prison.
This is one tough, lengthy battle, by the way, at least for youngish parties. If that's you, you might want to consider getting the last auto-save, and gaining a couple of levels before tackling things.
A few points to note:
Avoid the fleshy, pulsating protuberances on the ground. Not only do they look disgusting, but if one of your character steps on one, they'll be transported to a cage dimension filled with enemies. Not good.
Summoned creatures can step over the protuberances without effort. Your party has to go around 'em.
Grab some of the devices you'll find on the prisoners who attack you. You'll know what I mean when you find 'em. Don't use 'em. Just keep 'em. They'll come in handy much later in the game.
Save and rest frequently. You'll need it.