Maori in New Zealand

What is the original purpose of the Haka dance performed by the Maori in New Zealand?

Traditional dance performed to scare off evil spirits and contain the spirit of death.
Traditional battle preparation of male warriors performed to intimidate and scare the enemy.
Traditional dance performed prior to going for hunting expeditions.
Traditional dance performed to bid farewell to a departed  soldier.
Traditional dance performed to celebrate the enskinment of a new chief.