Match ends, Hamilton Academical 1, Rangers 4.
A second-half Rangers blitz subdued Hamilton Academical and booked the Glasgow side's place in the Scottish Cup last eight.
Scott Arfield netted the first goal, from a penalty rebound, and the last, a stunning late long-range raker.
Lewis Smith had hauled the Scottish Premiership hosts level, but Joe Aribo and Alfredo Morelos made the tie safe.
The quarter-final draw takes place on Sunday after the last tie of the weekend between Clyde and Celtic.
Steven Gerrard's men dominated much of a compelling contest, but it was not until the final quarter that they made their supremacy tell.
Hamilton head coach Brian Rice watched from the stands as he served the third match of a five-game touchline ban for breaching Scottish FA betting rules.
Depleted Hamilton eventually crumble
Hamilton were diligent but callow, and desperately depleted come half-time, by which point they had been forced to make all three substitutions.
Rice fielded a 17-year-old centre-half, a 19-year-old central midfielder and a 17-year-old centre-forward. Accies had no right to topple this Rangers team, despite the visitors' tepid start to 2020, but they gave it a good crack.
Two of the whippersnappers played pivotal roles in a helter-skelter first half. Rangers bossed it for the most part, Ianis Hagi heading a fraction wide from a Ryan Kent delivery, Kent blasting at Luke Southwood from distance, but Smith too spurned a fine chance on the breakaway.
Then came the culmination of a brutal week for Jamie Hamilton. The teenage defender was turned by Morelos and in sheer desperation dived head-first at the feet of the Colombian. A red card against Celtic last Sunday, a blatant penalty shipped against Rangers - these been seven harsh days of learning for the young man.
Southwood flew to his right to block Arfield's spot-kick, but was unlucky to see the ball land back at the feet of the midfielder, who caressed casually into the net.
At that point, it looked like Rangers would run away with it. Southwood raced out to thwart Morelos, James Tavernier volleyed over after being played in by the striker, the excellent Hagi was a crafty menace.
And then it got worse for Accies. Two injuries in two minutes - off went Steve Davies and Andy Dales; on came Marios Ogkmpoe and Mickel Miller. Oddly, the enforced switches jolted Hamilton into showing more intent in attack - the bulky Ogkmpoe brought a physicality and directness that Rangers did not know how to combat.
Suddenly, they drew level. Ogkmpoe bamboozled Borna Barisic and George Edmundson, and teed up Smith right of goal, whose sumptuous low finish trickled across Allan McGregor and nestled in the bottom-left corner.
Play began to course from end to end, Ogkmpoe's square ball was deflected narrowly wide, Southwood fumbled and then just managed to smother a Hagi effort, then put Kent's walloped drive round a post.
Hamilton should have had a penalty when Connor Goldson made an awful mess of a diving header, blocking a cross with a flailing left arm and then landing face-first on the ball. He got away with the gaffe.
Then at the death, Miller flummoxed Barisic and was only denied by a terrific Glen Kamara cover tackle. The substitute was injured in the process and had to be substituted himself by Blair Alston.
Rangers reset and got a grip of the game after the break. It took Aribo's smart intervention to finally splinter Accies. The midfielder galloped into the box and clipped Kent's delivery into the bottom-right corner with a languid flick of his right boot.
Then the flood gates opened. Morelos made Rangers' passage to the last eight safe with a predatory header five minutes from time after Greg Stewart's shot took a looping deflection and dropped for him six yards out.
And then Arfield added a delicious finale, rattling in a thunderous drive off the underside of the crossbar from 25 yards. These were moments of class and ruthlessness that settled a testing tie.
'Our legs were tired' - reaction
Hamilton Academical assistant manager Guillaume Beuzelin: "It was pleasing in terms of performance and effort. But we were missing a little bit.
"The guys came in and did well but after an hour-75 minutes, our legs were tired and we couldn't bring on any subs because we'd made them already."
Rangers manager Steven Gerrard: "The scoreline maybe flattered us a little if you look at what happened in the first half. How we went about creating chances was very impressive. I was disappointed in us defensively.
"I had to address that at half-time and rattle a few cages and get them in the right place. Once we did that, we played some nice stuff, created a lot of chances and scored some really impressive goals."
- 13GogicBooked at 53mins
- 26DalesSubstituted forMillerat 37'minutesSubstituted forAlstonat 45'minutes
- 8DaviesSubstituted forOgkmpoeat 36'minutes
- 19WinterBooked at 19mins
- 31BarisicSubstituted forHallidayat 69'minutesBooked at 78mins
- 7HagiSubstituted forDavisat 73'minutes
- 14KentSubstituted forStewartat 82'minutes
- Alan Muir
- Shots on Target
Second Half ends, Hamilton Academical 1, Rangers 4.
Goal! Hamilton Academical 1, Rangers 4. Scott Arfield (Rangers) right footed shot from outside the box to the top left corner.
George Edmundson (Rangers) wins a free kick in the attacking half.
Foul by Alexander Gogic (Hamilton Academical).
Foul by Glen Kamara (Rangers).
Blair Alston (Hamilton Academical) wins a free kick on the left wing.
Goal! Hamilton Academical 1, Rangers 3. Alfredo Morelos (Rangers) header from the centre of the box to the bottom left corner. Assisted by Greg Stewart.
Substitution, Rangers. Greg Stewart replaces Ryan Kent.
Andy Winter (Hamilton Academical) wins a free kick on the left wing.
Foul by Connor Goldson (Rangers).
Attempt blocked. Steven Davis (Rangers) right footed shot from outside the box is blocked.
Andrew Halliday (Rangers) is shown the yellow card for a bad foul.
Marios Ogkmpoe (Hamilton Academical) wins a free kick in the defensive half.
Foul by Andrew Halliday (Rangers).
Corner, Rangers. Conceded by Lewis Smith.
Corner, Rangers. Conceded by Brian Easton.
Brian Easton (Hamilton Academical) wins a free kick in the attacking half.
Foul by Alfredo Morelos (Rangers).
Substitution, Rangers. Steven Davis replaces Ianis Hagi.