Sergio Aguero scored his sixth goal in his last three games as Manchester City edged a gutsy Sheffield United at Bramall Lane.
The Blades had looked on course to claim a hugely credible draw against the reigning Premier League champions, with Dean Henderson saving a Gabriel Jesus penalty in the first half as well as making a string of excellent saves.
But Aguero came off the bench to score the decisive goal, tapping in a cross from Kevin de Bruyne towards the end of the second half.
That strike came just moments after Sheffield United came close to taking the lead themselves - Oli McBurnie stretching to meet a cross but just failing to turn the ball into an empty net.
Victory for Manchester City means they strengthen their place in second. They have 51 points - 13 behind leaders Liverpool but six ahead of Leicester, who play West Ham on Wednesday.
Sheffield United, meanwhile, remain seventh on 33 points.
Aguero helps City come through tough test
It is hard to imagine that a manager who has won trophies wherever he has worked is claiming he can still learn from others, but that's exactly what Pep Guardiola said prior to this game.
The former Barcelona and Bayern Munich boss spoke highly of Sheffield United under Chris Wilder, saying they are a team he can learn from.
For large periods of this game the Blades certainly gave Guardiola plenty to think about, with their disciplined and organised defence frustrating City for well over an hour.
In the end, Guardiola had to turn to the ever-reliable Aguero to get the job done.
At 31, the Argentina international is in the twilight years of his football career but is arguably enjoying some of his best form.
It took him just six minutes to get on the scoresheet after coming on for Jesus, who had struggled to get the better of the Blades' defence.
Aguero has now scored 21 goals in just 23 appearances in all competitions this season, including eight in his last five appearances.
The league title may be increasingly out of reach for City but Aguero's form could be vital for their aspirations in other competitions.
Just as crucial, though, could be the return of Aymeric Laporte. Injuries have meant Guardiola has often had to field a makeshift defence this season but Laporte made a surprise return at Bramall Lane after five months out with injury.
The result was a first clean sheet since City hosted Sheffield United at the Etihad at the end of December and Guardiola was delighted with the French player's return.
"We miss him the lot," he said. "Imagine if the best teams in the world lose their best central defenders.
"We knew he could not play 90 minutes. He is an incredible guy. He was exceptional. It is good news for us."