The number of killed hostages vary, Reuters says at thirty, the BBC says four based on information from algerian state-tv.
This way or another, a tragic outcome - though I doubt that there were any other (realistic) options left.