I've never done it myself, but from my understanding you can clear some/most/all of the mobs before you free him.