Waikato opened the scoring in the second minute when first five-eighth Damian McKenzie broke the defensive line with ease and sent second five-eighth Anton Lienert-Brown over for a try. McKenzie converted.
Three minutes later, Magpies pivot Ihaia West missed with his first penalty attempt from 49 metres. West opened the Magpies' account with a 12th-minute penalty when the visitors were penalised for not rolling away.
Magpies hooker Ash Dixon put the hosts ahead in the 18th minute with a try which followed superb pressure from the forwards after a five-metre scrum. West missed the conversion attempt.
The Magpies were fortunate McKenzie missed a 20th-minute shot at goal from 37 metres after prop Brendon Edmonds conceded an offensive penalty.
Bay of Plenty referee Nick Briant and his TMO Mark Johnson of Hawke's Bay were a little harsh on Magpies winger Zac Guildford when he was sinbinned for a dangerous tackle in the 23rd minute. A penalty would have been sufficient.
McKenzie slotted the penalty from 46 metres and Waikato led 10-8.
Outstanding continuity from Waikato led to a try from prop Josh Hohneck which McKenzie converted to extend the visitors' lead.
The thrilling nature of the challenge continued when the Magpies replied with a 39th-minute try to captain and flanker Brendon O'Connor from a lineout drive which involved all but three of the Magpies. West converted and the Magpies trailed 17-15 at halftime.
Waikato deserved this lead as the hosts were guilty of conceding too many penalties, rushing things when they shouldn't have, particularly when Guildford was in the sinbin, and poor ball security.
The Magpies produced some outstanding defensive work during the first five minutes of the second half. However, Waikato took a 24-15 when Weber scored in the 52nd minute after a clever kick and regather burst from winger Jordan Trainor, who was making his debut. McKenzie nailed the conversion.
West closed the gap with a 60th-minute penalty.
But two further Weber tries in the final quarter, one of which McKenzie converted, were the key to the latest transfer of the log 'o wood.
The Magpies refused to throw the towel in and winger Robbie Fruean crossed in the 75th minute. However Briant ruled it inconclusive.
The hosts still weren't done. Fullback Lewis Marshall scored a try which West converted and O'Connor scored his second try seconds from the final hooter.
Those two bonus points could prove crucial when the home final is decided should the Magpies win their ITM Cup Championship semifinal. The character they displayed as they fought back last night is the proof they have the goods to win a semifinal.
They will be their own worst critics as they review last night's loss.
"Our biggest enemies are ourselves. Those brain explosions and loose play ... we will learn from it," Magpies hooker Ash Dixon said.
O'Connor and lock Mark Abbott were the Magpies' best. But it was Weber, McKenzie and co's night.
The visitors were more accurate, simple as that. Their defensive work until the hosts' late comeback couldn't be faulted. Waikato might have missed on a Premiership final but they have the Ranfurly Shield.
Their young team will only get better and they will be hard to dethrone.
The Magpies still have the opportunity to taste Championship glory. It's been five seasons since that occurred and it's overdue.
MATCH HIGHLIGHTS
Heartstopper: There were plenty of these, mostly when Bay of Plenty referee Nick Briant was checking things out with his Hawke's Bay TMO Mark Johnson. Unfortunately most of the final decisions didn't go in the Magpies' favour.
Turning point: Again when referee Briant blew the final whistle. This thriller could have gone either way and the Magpies deserve heaps of kudos for their memorable fightback.
Player of the match: Waikato halfback and captain Brad Weber. His father and former Magpies manager and halfback Neil Weber must have had mixed emotions when he congratulated him afterwards. His first five-eighth Damian McKenzie wasn't far behind him and so were the Magpies pair of captain and flanker Brendon O'Connor and lock Mark Abbott.
Scorers: Waikato 36 (Brad Weber 3, Josh Hohneck, Anton Lienert-Brown tries; Damian McKenzie 4 cons, pen) Hawke's Bay Magpies 30 (Brendon O'Connor 2, Ash Dixon, Lewis Marshall tries; Ihaia West 2 pens, 2 cons).
Halftime: 17-15.