The Foxes went into the game on the back of three consecutive league defeats, which cut their lead at the top of the table from 12 points to just three.

But Vardy’s 10th goal of the season, a headed finish after a Kiernan Dewsbury-Hall free kick from the left, saw them home in an uninspiring encounter at the Stadium of Light.

The Black Cats lost their fifth game in a row, falling from the play-off spots to 10th place in that time, 10 points outside the top six.

They have also lost every game since Mike Dodds took interim charge of the team following the sacking of Michael Beale just 12 games into his tenure as head coach.

Leicester were far from inspiring in a game with few clear chances for either side, but this was a huge test for Enzo Maresca’s team after a downturn in form that threatened to derail what had appeared to be a procession to the Championship title.

Having leaked late goals and wasted key chances in their previous three games, City were resolute in defence – with goalkeeper Mads Hermansen making crucial saves from Luke O’Nien and Troy Hume either side of the break.

In Vardy, they had the potent finisher they have needed, with the Foxes’ record goalscorer nodding home after Wout Faes’ header was well saved by goalkeeper Anthony Patterson from Dewsbury-Hall’s cross.

There was late drama as referee Sunny Sukhvir Gill rejected fierce Sunderland appeals for a penalty when Callum Styles went over under pressure from Leicester defender Hamza Choudhury.

However, the Foxes held on to earn a victory which keeps them three points clear of second-placed Ipswich, and five points of third-placed Leeds in the race for automatic promotion.