Charlie Wyke scored his 19th League goal of the season to sink Swindon Town and send Sunderland fourth in the table.
The Black Cats struggled to create clear-cut openings against the Robins until Wyke headed home from a free-kick 20 minutes from time.
That goal proved decisive, although Sunderland should have added further goals but they wasted opportunities to punish Swindon on the break.
And that meant they were left to breathe a sigh of relief in injury-time when Scott Twine hit the crossbar with a free-kick, as the visitors came within inches of nicking a point.
But the victory means Sunderland moved up a place, and cut the gap between themselves and the automatic promotion places to five points – and they still have two games in hand of second-placed Hull City.
Lee Johnson made two changes to the side that started on Saturday when Sunderland came from 2-0 down to salvage a draw at Crewe Alexandra.
On-loan Rangers winger Jordan Jones, who came off the bench to score his first goal for the Black Cats at Gresty Road, made only his second league start for the club, with Aiden O’Brien dropped to the bench.
And Carl Winchester came into central midfield, with defender Conor McLaughlin dropping out.
Johnson also switched to a 3-4-3 system fielding only one recognised centre-back in Dion Sanderson, who had Max Power and Luke O’Nien either side of him.
That meant Lynden Gooch and Callum McFadzean played as wingbacks, with Winchester and Josh Scowen the central midfielders, and a front three of Charlie Wyke flanked by Jones and Aiden McGeady.
Swindon boss John Sheridan handed a debut to goalkeeper Connal Trueman, who signed for the Robins from Birmingham City yesterday on an emergency loan deal.
That was one of two changes he made to the side that beat Northampton at the weekend, the other seeing defender Rob Hunt come into the side in place of Paul Caddis.
It was one-way traffic in the first half, with Sunderland having more than 70 percent of the possession while Swindon were content to defend in numbers and soak up pressure.
But for all their dominance, the Black Cats did not force Trueman into a single save in the first period, with Winchester sending a long-range shot wide of the target, while Jones saw an effort deflected over the bar.
Sunderland’s best chance came just before the midpoint of the half when Gooch beat former Middlesbrough defender Jonathan Grounds for pace on the right, got into the penalty area and cut the ball back for Wyke at the near post but the striker sent his shot narrowly wide of the right-hand upright.
Swindon offered negligible attacking threat from open play, but they did force Lee Burge into a couple of saves from set-pieces.
An early 25-yard free-kick from Scott Twine saw Burge dive low to his right to push the ball away, and he was up quickly to save Dominic Thompson’s follow-up.
And 10 minutes before the interval, another long range free-kick from Twine dipped at the last second but Burge had watched it all the way and saved and held it.
Sunderland switched to a back four for the second half and they began to ask more questions of the Swindon defence.
It still took them almost an hour to register their first shot on target, and when it came Gooch’s powerful drive from outside the box was pushed round the post by Trueman.
Gooch picked up an injury and was replaced by O’Brien, with Johnson also taking the opportunity to bring on Chris Maguire in place of Jones.
And 20 minutes from time, Maguire was the architect as Sunderland made the breakthrough.
His produced a magnificent delivery from a free-kick over on the right-hand side, and Wyke was there to head into the bottom left-hand corner.
Burge came to Sunderland’s rescue a couple of minutes later when he was quickly off his line to block a shot from Swindon sub Hallam Hope, and when the rebound came to Brett Pitman he was off-balance and could only hook it behind.
Sunderland had chances to kill the game off in the latter stages, but a poor pass from Wyke to Maguire wasted one counter-attack.
Then Maguire should have sealed it in injury-time when he had an excellent chance inside the area but his shot was blocked by the keeper’s legs.
And Sunderland were almost punished for those misses with virtually the last kick of the game, as Twine rattled the crossbar with a free-kick from 35 yards out with Burge beaten, with the referee blowing for full-time seconds later.
How they lined up
SUNDERLAND: Burge, Power, Sanderson, O’Nien, Gooch (O’Brien 62), Winchester, Scowen (Neil 90+3), McFadzean, Jones (Maguire 62), Wyke, McGeady (Diamond 90+1). Subs not used: Matthews, Vokins, Younger
SWINDON TOWN: Trueman, Conroy, Broadbent, Grounds, Thompson (Hope 72), Payne, Twine, Palmer (Missilou 82), Hunt, Garrick, Pitman (Omotoye 73). Subs not used: Matthews, Caddis, Iandolo, Curran
REFEREE: Peter Wright (Merseyside)