The Highlanders brought an end to an eight match losing streak this year when they beat the Sharks 25-22 in Dunedin.
The Highlanders outscored the Sharks by two tries to three after trailing 7-15 at half time.
The loss is the fourth in a row for last year's Super Rugby finalists the Sharks who had several opportunities in the closing minutes to settle for a draw with a penalty kick but insisted on going for the try.
The contest was lock Brad Thorn 100th Super Rugby appearance and he ended the match in the sin-bin.
The match was filled with an abundance of scrappy play, errors and tactical misjudgments from both teams also included a handful of brilliant tries and a thrilling finish as the Highlanders, who were down to 14 men, defended desperately on their line.
Highlanders flyhalf Colin Slade scored 15 points for the Highlanders through a try, two penalties and two conversions.
Slade's try in the 51st minute was the last scoring play by the Highlanders, giving them a 25-15 lead with 25 minutes left.
When center Meyer Bosman scored his second try of the night for the Sharks, slashing the lead to 25-22, the Highlanders' winless run to the season look liked it might be extended.
They defended with outstanding commitment throughout the last 20 minutes of the match, mostly situated on their own line and finally with only 14 men as the 38-year-old Thorn watched on from the sideline.
The Sharks attacked relentlessly in the last 10 minutes, often carrying the ball for more than 20 phases within 10 metres of the line.
The Highlanders repelled one such attack in the 78th minute, finally forcing a turnover on the 25th phase but managing only to clear the ball to touch.
The Sharks received a steady torrent of penalties late in the match. From one, in the 79th minute, Thorn was sin-binned for a professional foul.
Late in stoppage time, Highlanders winger Hosea Gear made a crunching tackle to force a turnover and allow his team, buckling under pressure but unbowed, to win possession and stop the clock.
Born only a few miles from the stadium at which the match was played, Thorn made his name first as an Australian rugby league international before becoming an All Black.
He has made only eight appearances for the Highlanders with his previous 92 Super Rugby matches, between 2001 and 2011, coming in the colors of the Christchurch-based Crusaders.
"First of all, I take my hat off to the Sharks who gave a terrific performance a long way from home," Thorn said.
"I'm just really honored to come back to where I'm from and I'm very, very proud to play in front of my people."
The match see-sawed throughout. Center Shaun Treeby, returning from injury, scored the home team's opening try in the 10th minute.
But Bosman's first try and a superb counter-attacking effort from Lwazi Mvovo put the Sharks 15-7 ahead at halftime.
Slade hit the post twice with penalty attempts, but his try and another by scrumhalf Aaron Smith gave the Highlanders a 10-point lead midway through the second half.
The Sharks hit back through Bosman's second try 19 minutes from fulltime before their late, unsuccessful push.
Final Score Highlanders 25 (7) Sharks 22 (15)
Tries - S.Treeby, A Smith, C. Slade
Pen - C.Slade 2
Con - C.Slade 2
Cards - B.Thorn (79th min yellow)
Tries - M.Bosman 2, L.Mvovo
Pen - P.Lambie
Con - P.Lambie 2
Cards - JP.Pietersen (yellow 5th min)
Referee: Steve Walsh
Assistant Ref 1:Mike Fraser
Assistant Ref 2:Kane McBride
TMO : Keith Brown
1. Tony Woodcock,2. Andrew Hore (captain),3. Chris King,4. Brad Thorn ,5. Josh Bekhuis,6. Jarrad Hoeata,7. John Hardie,8. TJ Ioane,9. Aaron Smith ,10. Colin Slade ,11. Hosea Gear (vice-captain),12. Shaun Treeby ,13. Tamati Ellison ,14. Phil Burleigh ,15. Ben Smith
Replacements : 16. Liam Coltman ,17. Ma'afu Fia ,18. Elliot Dixon ,19. Joe Wheeler,20. Fumiaka Tanaka ,21. Hayden Parker ,22. Jason Emery
15. Riaan Viljoen , 14. JP Pietersen , 13. Francois Steyn , 12. Meyer Bosman , 11. Lwazi Mvovo , 10. Patrick Lambie , 9. Charl McLeod , 8. Lubabalo Mtembu , 7. Marcell Coetzee , 6. Keegan Daniel (C) , 5. Franco van der Merwe , 4. Pieter-Steph du Toit , 3. Jannie du Plessis , 2. Kyle Cooper , 1. Wiehahn Herbst
Replacements : 16. Craig Burden , 17. JC Janse van Rensburg , 18. Anton Bresler , 19. Jean Deysel , 20. Tian Meyer , 21. Piet Lindeque , 22. Odwa Ndungane / Derick Minnie