Hull KR came from 18 points down to draw level with Huddersfield, but a Danny Brough drop goal kept the Giants in the top flight.
Huddersfield Giants secured their Super League status for 2017 in dramatic fashion, edging out Hull KR 23-22 in a thrilling encounter at Craven Park to ensure Rovers face a play-off to remain in the top flight.
Both teams came into Saturday's match knowing victory would be enough to claim third place in the Qualifiers, behind Leeds Rhinos and Leigh Centurions, with the loser going into next weekend's 'Million Pound Game' against either Salford Red Devils or London Broncos.
The Giants appeared set to triumph comfortably after Ryan Brierley excelled in the first half, scoring two tries and laying on another for Leroy Cudjoe.
Aaron Murphy also crossed before the interval as Huddersfield moved 22-4 ahead, but Rovers came storming back and were level when Iain Thornley scored their fourth try on the hour mark.
That set up a grandstand finish, with Danny Brough's 73rd-minute drop goal ultimately proving decisive. Terry Campese's subsequent one-point attempt at the other end hit the post and Thomas Minns saw a late try disallowed for obstruction as the visitors just about held on.
Should Salford earn the right to face Hull KR next weekend, the former's director of rugby, Tim Sheens, will step down from his role ahead of the game. Sheens has agreed to become the Rovers coach from 2017.