Rangers came from behind to defeat Greenock Morton 2-1 at Ibrox to reach the Viaplay Cup Quarter-Finals.
The cinch Championship side took the lead on 53 minutes when Grant Gillespie scored from the penalty spot after Kirk Broadfoot was fouled by Cyriel Dessers.
Dessers levelled matters from the spot seven minutes later when Broadfoot was penalised for a pull on Leon Balogun's shirt.
And Brazilian striker Danilo came off the bench to score the winning goal on 68 minutes.
Michael Beale's men held on to book their place in the last eight of the competition.