Taking hostages is today considered a crime and/or terrorist act, however it has a history of military use dating back thousands of years.
See also laws of war.