A calamitous late own goal was enough to book Rovers’ place in the FA Cup third round and see boss Paul Dickov gain revenge over former employers Oldham.
Just when a goalless draw seemed a certain outcome, Rovers grabbed the winner three minutes from time.
Paddy Kenny parried Enda Stevens’ cross, both substitute Dean Furman and Genserix Kusunga went for the ball and it was sent over the line, despite the keeper’s attempts to hook it out.
A draw would have seemed a fair outcome given an even contest at a bitterly cold Boundary Park. But the sheer industriousness of Rovers could not be denied as they followed a threatening first half with a hard working second period spent mainly on the back foot.
Though the hosts edged matters in possession terms in the opening period, Rovers always looked to have more intent with the ball and crafted a handful of good opportunities to open the scoring.
Paul Dickov’s men threatened against his former club inside the first minute. Kyle Bennett surged into the box and laid off to Curtis Main who turned and clipped a shot which deflected narrowly over.
And they had the game’s first attempt on goal. A neat short corner routine between Richie Wellens and James Coppinger saw Bennett played into space just inside the box but his shot took a deflection into the arms of Paddy Kenny.
Soon after Reece Wabara stung Kenny’s hands with a rasping drive from the corner of the box.
Oldham enjoyed the better of the possession in the early stages but struggled to create a real opening.
Their best chance came from a Rovers error. Coppinger, under pressure, looked to fine Sam Johnstone but left his backpass short meaning a dash and a lunge was needed from the Rovers keeper to get in ahead of Danny Philliskirk.
Rovers ought to have been in front on 32 minutes. Wellens chested down a fine cross from Paul Keegan, playing a neat one-two with Theo Robinson only to scuff his shot tamely at Kenny from eight yards out.
There was a real let-off for Rovers eight minutes from the break with the hosts producing their best pair of chances of the half.
First, Jonathan Forte got in behind the Rovers defence only to be blocked out superbly by Johnstone.
And then, as the Rovers defence failed to deal with the bouncing ball from Johnstone’s block, Jabo Ibehre had time and space to turn and shoot, only to send his effort well over the bar from 12 yards.
Rovers may have had the better of the chances of the first half at Boundary Park but the hosts emerged much the brighter after the break.
Nine minutes into the second half, George Elokobi rose well between Rovers’ two centre halves to head a Daniel Johnson free kick but sent it over the bar.
Danny Philliskirk found space for a couple of efforts in quick succession, twice testing Sam Johnstone.
First, he turned a header on goal from a Brian Wilson corner before drilling a fierce shot on the angle which required strong palms from the Rovers keeper.
The best chance of the half fell to Rovers six minutes from time. Theo Robinson collected a lofted pass from Richie Wellens, drilled a pass inside to substitute Harry Forrester who returned the favour but Robinson was denied superbly by Paddy Kenny.
After the goal on 87 minutes, Johnstone was forced into a fine save on the angle to keep his side in front.
Oldham: Kenny, B Wilson, Kusunga, Elokobi, Mills, Winchester (Poleon 69), Kelly, Ibehre, Johnson (Morgan-Smith 89), Forte, Philliskirk.
Subs: Rachubka, Dieng, Dayton, Poleon, Mellor, Tidser, Morgan-Smith.
Rovers: Johnstone, Wabara, Butler, McCullough, Stevens, Coppinger (Furman 67), Wellens, Keegan, Bennett (Forrester 75), Main, Robinson.
Subs: Marosi, McCombe, Wakefield, Furman, De Val, Forrester, McKay.
Referee: Lee Collins (Surrey)