Hawke's Bay winger Zac Guildford denied Bay of Plenty a sure Air New Zealand Cup victory after touching down in the 80th minute to beat their hosts 22-19 in Rotorua on Friday.
With the scores reading 9-6 in favour of the visitors at half-time, the match was destined to go down to the wire.
It was only in the last minute that Bay of Plenty were found wanting and even then there was little they could do after a delicate cross kick from full-back Israel Dagg sat up invitingly for Guildford to score in the corner.
Magpies fly-half Matt Berquist was successful with the touchline conversion to finish with 17 points on the night.
Before kick-off, and with the Steamers sitting in fourth position on the Air New Zealand Cup points table, just a single point behind the Magpies - victory was imperative for both sides.
The prize at stake for the winner in this hard fought contest, was a big step towards a semi-final berth and Hawke's Bay fans will be delighted with this victory.
Bay of Plenty fly-half Mike Delany accounted for all of his team's points, including a 43rd-minute try when he finished off a midfield bust by number eight Colin Bourke.
Delany proved his worth one minute later when his tackled Hawke's Bay captain Jason Shoemark just short of the line at the other end of the field.
That one act summed up Bay of Plenty's determination on defence, which wavered just the once when Guildford snatched the match-winning try.
A tight first half had ended narrowly in Hawke's Bay favour after the teams traded penalties. Neither side held on to the ball long enough to build sustained pressure although one sweeping breakout from Hawke's Bay was only snuffed out at the last moment when they were spoilt for options.
It was indicative of the desperation in defence that kept Bay of Plenty in the contest after they were on the wrong side of the territory and possession ledgers throughout the first spell.
However, Hawke's Bay hunted until the final whistle and had its belated reward.
For Bay of Plenty:
Pens: Delany 4
For Hawke's Bay:
Pens: Berquist 5
Bay of Plenty: 15 Toby Arnold, 14 Ben Smith, 13 Nigel Hunt,12 Phil Burleigh, 11 Jason Hona, 10 Mike Delany, 9 Junior Poluleuligaga, 8 Colin Bourke (c), 7 Tanerau Latimer, 6 Zac Hohneck, 5 Culum Retallick, 4 John Moore, 3 James McGougan, 2 John Pareanga, 1 Joe Savage.
Replacements: 16 Dean Elmiger, 17 Josh Hohneck, 18 Mark Burman, 19 Matt Henwood, 20 Josh Hall, 21 Corey Aporo, 22 Zar Lawrence.
Hawke's Bay: 15 Israel Dagg,14 Jason Kupa, 13 Jason Shoemark (c), 12 Andrew Horrell,11 Zac Guildford, 10 Matt Berquist, 9 Chris Eaton, 8 Thomas Waldrom, 7 Karl Lowe, 6 George Naoupu,5 Ross Kennedy, 4 Michael Johnson, 3 Clint Newland, 2 Hikawera Elliot,1 Faka'anaua Taumalolo.
Replacements: 16 Ash Dixon, 17 Josh Keys, 18 Matt Egan, 19 Adam Bradey, 20 Dane Shelford, 21 Richard Buckman, 22 Mark Jackman.
Referee: Garratt Williamson