Watch: Samoa give Sir Gordon Tietjens first win over former team with game-winning try against All Blacks Sevens after final hooter

The All Blacks Sevens have survived a shock loss to Sir Gordon Tietjens' Samoa to make the Cape Town Sevens quarter-finals.

The Kiwi team was at risk of their first-ever exit in pool stages of a World Series sevens men's tournament after Samoa managed to go the length of the field as the hooter went to score a game-winning try.

The score gave Samoa a 21-17 win over NZ - Sir Gordon's first win against his old team.

As a result, New Zealand needed to beat hosts South Africa in their final pool game to qualify for the Cup Quarterfinals and despite falling behind early in the second half, managed to come back for a 26-21 win.

The All Black Sevens will now face Australia in the quarterfinals at 11:48pm NZT tonight with the winner going on to face the victor of the clash between USA and England.

On the other side of the bracket, South Africa take on Scotland while Fiji play Spain.

More From