Keighley caught Doncaster off guard to keep Tony Miller’s men looking over their shoulders in the race for Championship survival.
The Dons were confident after five wins out of their last six, including a 32-12 win at home to Keighley.
But the visitors perhaps had one eye on Friday’s Northern Rail Cup semi-final as they were put to the sword.
First half tries from Liam Kay and Carl Hughes had Doncaster on the front foot, and 10-6 ahead from the 25-minute mark, before Cougars turned the game on its head.
The hosts broke the deadlock on 16 minutes when James Haley capitalised on an error from Dons debutant Dave Scott, signed on loan from Featherstone as cover for injured winger Dennis Tuffour, to open the scoring.
Scott Leatherbarrow kicked the first of his five conversions to make it 6-0.
Dons replied immediately when Kay crossed in the corner before Scott atoned for his earlier error by racing 60 metres to release Hughes for a second score, converted by Stewart Sanderson.
But that from point on little went right for Doncaster as a penalty awarded for offside allowed Paul March to squeeze over the line and level the scores, with Leatherbarrow’s conversion making it 12-10 to Keighley at the break.
And there was much worse to follow as four unanswered second half tries from Paul White, Sean Hesketh, Leatherbarrow - who raced 80meters to score - and Haley.
Keighley’s win moved them level on points with Doncaster, who are just three points clear of bottom side Barrow despite being fifth from bottom in the standings.
Dons: Waterman, Scott, Cowling, Kay, Sanderson, Cooke, Fawcett, Castle, Emmett, Waller, Scott, Edwards, Trout. Replacements: Hughes, Powley, Garbutt, Spiers.