Staff and pupils of Palmerston North Boys' High School in New Zealand paid an incredible tribute to a long-serving teacher at his funeral by performing a spine-tingling Haka.

Dawson Tamatea, head of Te Reo Maori and Dean of Student Achievement, who had taught at the school since 1986, died in his sleep on July 20, One News Now reported.

The beloved teacher taught physical education and math for nearly 30 years. The entire school re-enacted the traditional Maori war dance that is recognized from the national team's rugby matches.

A black hearse carrying Tamatea's casket is seen in a recent video arriving at the school and was stopped by a group of 1,700 students. The boys performed an emotional Haka lead by the staff and teachers for two minutes.

Thousands of people attended his funeral, which was also live streamed online, The Telegraph reported.

"This was a very emotional and powerful performance," the YouTube video's description says. "We are extremely proud of our boys' performance and we know that Mr. Tamatea would be too."

The video reached over two million viewers and received plenty of positive comments, one of which said, "Can instantly tell that Mr. Tamatea was a great teacher. Such Respect from the students is demonstrative of that."