Richard Chaplow slammed home a dramatic last gasp winner to settle a closely fought South Yorkshire derby.
Barnsley had deservedly fought back to level through Sam Winnall after Keshi Anderson had given Rovers a first half lead.
The visitors – led by left winger Kadeem Harris – had looked more likely to nick all three points before Chaplow latched onto Harry Middleton’s pass and fired low past Nick Townsend.
The victory was only Rovers’second league win of the season and the first of Rob Jones’ reign as caretaker boss – and could prove to be a very timely one with the club set to commence interviews for Paul Dickov’s successor next week.
Doncaster’s win also stretched their unbeaten run against Barnsley to six games.
Rovers started with a front three of Andy Williams, Anderson and Dany N’Guessan - a real show of intent from Jones - but had failed to trouble Townsend in the Barnsley goal before they went ahead.
In fact, prior to the opening goal, the visitors had shown more signs of wrestling control of a somewhat frantic contest.
Harris, on Barnsley’s left, was the game’s stand-out player. He beat James Horsfield for pace but his teasing cross brushed off the head of Marley Watkins, and later cut inside dangerously before firing over the bar - prior to Doncaster breaking the deadlock against the run of play.
Anderson, the deeper of Rovers’ strikers, had been very quiet but was in the right place at the right time to flick home Chaplow’s cross from the right.
Barnsley got their rewards for starting the second period on the front foot when they equalised on the hour mark.
The nature of the goal was very soft from a Rovers perspective as, from a right wing corner, Winnall was allowed to nod home virtually unchallenged.
Man of the match Harris had gone closest to winning it, forcing Thorsten Stuckmann to save with his legs after bursting clear before later producing a full length save from the German.
However, it was Chaplow who had the final say when he kept it cool to ram home from inside the box as the clock ticked onto 90 minutes.
Rovers: Stuckmann, Horsfield (Taylor-Sinclair 74), McCullough, Butler, Evina, Wellens, Chaplow, Coppinger (Middleton 57), N’Guessan (Mandeville 81), Williams, Anderson. Subs not used: Marosi, Forrester, Keegan, Stewart.
Barnsley: Townsend, Wabara (Roberts 80), Mawson, Nyatanga, G.Smith (M Smith 81), Watkins, Scowen (Crowley 80), Hourihane, Pearson, Harris, Winnall. Subs: Davies, Jackson, Bree, Rothwell.