Doncaster striker Billy Sharp opened the scoring on an emotional night at the Keepmoat Stadium, but Middlesbrough came from behind to win.
Before kick-off Rovers announced that captain Sharp's two-day-old son had died on Saturday. The striker's response was to dedicate a stunning early volley to his memory.
Barry Robson's drive restored parity, and a mistake by Neil Sullivan allowed Marvin Emnes to grab a second.
Robson sealed the win with a penalty.
A minute's applause marked the tragically short life of Sharp's little boy Luey before kick-off and the forward sent fans at the Keepmoat Stadium into raptures when he netted a stunning dipping volley inside the first 15 minutes.
Sharp, who was named captain for the night, revealed a message to his son on a T-shirt underneath his Doncaster strip as he ran towards the home fans in celebration and referee Darren Deadman did not issue a yellow card.
Boro pulled level after 30 minutes when Robson was allowed a free run towards the Doncaster goal and he drove a 20-yard effort into the bottom corner.
Tony Mowbray's side upped the tempo and were ahead in first-half stoppage time when Scott McDonald released Faris Haroun down the right. The Belgian's low cross was met by Emnes, whose close-range effort was weak but Sullivan fumbled and the ball trickled into his empty net.
Doncaster players pay their respects before kick-off
Boro's third came with 66 minutes gone when former Scotland international Sullivan failed to hold a drive from Emnes, and although he managed to thwart Robson's follow-up, in the ensuing melee Pascal Chimbonda bundled Tony McMahon to the floor and referee Deadman pointed to the spot.
Sullivan guessed correctly, but Robson's well-struck penalty to the goalkeeper's left comfortably found the net.
Doncaster looked to respond late on through George Friend, who saw two long-range efforts well saved.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.