 Māui transformed himself into a hawk to escape, but to no avail, for Mahuika set both land and sea on fire.Māui prayed to his great ancestors Tāwhirimātea, god of weather, and Whaitiri-matakataka, goddess of thunder, who answered by pouring rain to extinguish the fire.Mahuika threw her last nail at Māui, but it missed him and flew into some trees including the māhoe and the kaikōmako.