The blood pressure of the Alhambra-Union coaching staff rose suddenly when Pirates attacked the line in the final seconds at Carisbrook on Saturday.
Pirates speedster Jeremy Cave was hurtling toward the corner when he was bundled into touch by flanker Brad Rapley and centre Paula Kinikinilau, and Alhambra-Union won 24-20.
"These games are about heart and commitment and my boys displayed that today.
I'm proud of them," Alhambra coach Marty Gray said.
Alhambra-Union had scored an unexpected try just before halftime.
Winger Desma Liaina followed up a failed penalty attempt by Luke Reihana and pounced on the ball over the line when a Pirates defender spilled it forward.
The game was played on a tightrope and the balance shifted throughout the game.
Either side could have won.
Alhambra-Union had a 20-minute purple patch in the middle of the match, scoring three tries and 18 points to lead 21-10 after 10 minutes in the second spell.
The team was playing with a ferocious intensity at this stage and the forwards were driving up the centre.
The front row of Scott Manson, Liam Coltman and Ben Pereira were dominating the game with driving runs and the pick and go.
No 8 Regan Turoa had an aggressive game and broke the advantage line from set-pieces and the breakdown.
The game changed when he left the field injured and the balance shifted back to Pirates, which responded to the call from No 8 and captain Warren Kearney to meet fire with fire by camping inside the Alhambra-Union 22m.
Pirates reduced the gap to one point, 21-20, when centre Marshall Suckling grabbed the ball from broken play and scampered 15m for his second try with just seven minutes left.
Other players to excel for Pirates were flanker Josh Clark, lock Steve Mison and lively halfback Steve Bruce.
Luke Reihana and Paula Kinikinilau had strong defensive games in the Alhambra-Union midfield and flanker Wahari Waitohi had an energetic game in the loose.
Alhambra-Union 24 (Desma Liaina, Brad Rapley, Ben Pereira tries; Luke Reihana 3 pen), Pirates 20 (Marshall Suckling 2 tries; Glenn Dickson 2 pen, 2 con).
Halftime: Alhambra-Union 13-10.
Referee: Tim Baker.