Rochdale, the best of the rest in pursuit of Salford and Leigh all season, scraped through to play Hull KR in the next stage of the National League One play-offs, but only after overcoming the most spirited resistance from Whitehaven.
The Hornets looked to be pulling away several times, but the Cumbrians kept dragging them back and were still striving for the try that could have won it for them when the final hooter blew.
Rochdale edged the first half, largely thanks to two tries from their Cumbrian centre, Jon Roper, the first from Radney Bowker's long pass and the second from David Larder's incisive run.
In between, Paul Smith, bound for Super League with Huddersfield next season, set up Mick Nanyn, who also landed all three conversions.
Whitehaven had led early on through Steven Kirkbride's penalty and again when Gary Broadbent dummied his way over and Kirkbride converted. Then, as the game appeared to be getting away from Whitehaven before half-time, they clawed their way back when Leroy Joe scrambled over at the foot of the post and Kirkbride added his third goal.
Rochdale struck first in the second half through Ian Watson's try, but could not shake off Whitehaven, who replied through Steven Wood.
It took a moment of real class to restore their 10-point lead, Paul Southern exchanging passes with Matt Leigh before going over. The speedy Marlon Billy then seemed to have put the result beyond doubt by going the length of the field for a spectacular solo try.
That, however, was not enough to discourage Whitehaven, with Carl Sice and Aaron Lester both scoring from close range to cut the margin to two points. Larder seemed to have clinched it with his second try, but Joe's converted try for Whitehaven made it a nail-biting finish.
Rochdale: Irwin; Nanyn, Bunyan, Roper, Billy; Bowker, Watson; Southern, Pachniuk, Price, Larder, Smith, Ball. Substitutes used: Calland, Leigh, Stephenson, Long.
Whitehaven: Broadbent; Wood, Seeds, Wilson, Lebbon; Joe, Kirkbride; Jackson, Lester, Fatialofa, Chambers, Hill, Purdham. Substitutes used: Sice, Miller, McKinney, Cunningham.
Referee: I Smith (Oldham).Reuse content