Premier League champions Leicester City secured a first home win of 2017 as Demarai Gray’s superb solo goal sealed an extra-time victory over Derby in their FA Cup fourth-round replay.

Andy King headed the hosts, who made 10 changes, ahead after Gray’s clever cross was nodded back across goal by Marc Albrighton.

Abdoul Camara’s free-kick forced extra time for Championship Derby only for substitute Wilfred Ndidi to restore the Foxes’ lead with a fantastic strike.

The English champions, who have slumped to within a point of the relegation zone, fielded a starting team filled with fringe players in view of a crucial league match against Swansea on Sunday and were held 1-1 by their second-tier opponents after normal time.

Wilfred Ndidi came on at the start of extra time and put Leicester ahead in the 94th minute, before Gray – the standout player at King Power stadium – finished Derby off by cutting in from the left, beating two defenders and driving a rising shot high into the net in the 114th.

Premier League Leicester will now face League One Millwall in the last 16 on 18 February.

Leicester’s victory came a day after the Thai-owned club gave its ‘unwavering support’ to Ranieri in a public show of faith for the manager who collected FIFA’s Coach of the Year award just a month ago.

Ranieri’s men have lost their last four games in the league, without scoring a goal. Their only win in seven games in 2017 was against Everton in the third round of the FA Cup.

‘We have 14 massive games left in the league,’ King said, ‘but now we are through a couple of rounds in the cup. Why can’t we create another journey this season?’