Nathan Broadhead scored the decisive goal as Sunderland edged past Gillingham with an injury-time winner. The Black Cats were the better side throughout at the Stadium of Light but it looked like they would run out of time.
However in the fifth mintue of added time, substitute Broadhead - who was making his comeback after a month out through injury - headed the winning goal.
The victory extended Sunderland's unbeaten run to seven games, and lifted them back into the play-off places with just six games remaining. Here's how James Hunter rated the Sunderland players.
Anthony Patterson 6
Had little to do, but looked solid when he was called upon
Carl Winchester 6
Did a decent job at right-back
Bailey Wright 6
Always calm and in control at the heart of defence
Danny Batth 6
Returned from injury and looked strong alongside Wright
Dennis Cirkin 6
Did his defensive duties well and got forward whenever he could
Corry Evans 6
Strong in the middle of the park and sent one good chance over the bar in the second half
Luke O'Nien 6
Worked hard and hit the bar with a header in the first half
Patrick Roberts 6
Always a threat on the right, but couldn't find the end product
Alex Pritchard 7
A welcome return from injury, for most of the game he looked the man most likely to unlock the Gills' defence
Jack Clarke 6
Did OK on the left, but no more
Ross Stewart 6
Well marshalled by Gillingham's back line
Subs
Lynden Gooch 6
For Winchester 68mins. When he came on, Sunderland started hitting the byline on the right
Elliot Embleton 7
For O'Nien 68mins. Produced the assist for the goal
Nathan Broadhead 7
For Pritchard 68mins. Marked his return from injury with a crucial goal
Not used: Hoffmann, Xhemajli, Neil, Matete
For the latest Sunderland news direct to your inbox, go here to sign up to our free newsletter