Rangers were made to work very hard for quarter-final spot in the Scottish Cup, but a late thrust ensured they ran out comfortable winners in the end.
Scott Arfield gave the visitors the lead midway through the first half when he was fired home the rebound from his missed penalty, but Hamilton fought back and went into the break level courtesy of a brilliant move which was finish by Lewis Smith.
The Gers had to be patient in the second half and it paid off when they retook the lead on the 68th minute with Joe Aribo side-footing into the far corner.
Alfredo Morelos added a third soon after, scoring his first goal of the new decade, before Arfield scored an absolute stunner in stoppage time.
Steven Gerrard was quick to state that the 4-1 score line flattered them and quite rightly gave credit to Hamilton. His men were not at their best, but its now the second time in the space of a week that Accies have went off the rails against the Old Firm.
Hamilton made six changes to the side that drew with St Mirren in midweek. It looked as if focus was on the big game on Tuesday night against Aberdeen.
Will Collar, Jamie Hamilton, Andy Dales, Steve Davies, Lewis Smith started along with 17-year-old Andrew Winter who was handed his first team debut. Shaun Want, Johnny Hunt, Scott Martin, Mickel Miller, David Templeton and Marios Ogkmpoe dropped out.
Steven Gerrard made one change from their 2-1 victory over Hibernian, with Glen Kamara replacing Steve Davis.
Rangers started the game well and came within inches of taking the lead after five minutes. Some nice play on the left saw Glen Kamara slip in Kent and his cross from the by-line was headed wide by Iainis Hagi at the back post.
The visitors were awarded a penalty on the 24th minute when young Jamie Hamilton slipped and brought down Alfredo Morelos in the process.
Scott Arfield stepped up to take the penalty and although Luke Southwood guessed correctly on the first occasion, he could only push it back into the danger area and Arfield calmly slotted home the second attempt.
Morelos came close to making it 2-0 soon after when he blasted a volley straight at the Southwood.
Hamilton were hit with more injury problems as both Steve Davies and Andy Dales limped off. On came Mickel Miller and Marios Ogkmpoe.
Remarkably, the two substitutes made an instant impact as Hamilton equalised.
Ogkmpoe was the provider as he held off his man before playing it out wide to Lewis Smith on the right-hand side. The 19-year old beat George Edmundson and drilled the ball into the far corner beyond Allan McGregor.
Hamilton were denied what was a stonewall penalty on the stroke of half time as Conor Goldson clearly handled Alex Gogic’s cross, but referee Alan Muir remained unmoved.
The injury concerns got even worse for Hamilton as Miller was unable to continue in the second half and didn’t re-emerge from the tunnel as the second half got underway.
Gers were struggling to create in the second half but took the lead on the 68th minute through a well-crafted goal.
Kent breezed by McGowan on the left wing and his cross towards the near post was precisely finished by Joe Aribo.
Similar to the game against Celtic last weekend, Hamilton ran out steam and Rangers nearly added a third soon after when James Tavernier’s free kick was well saved by Southwood.
The game was sealed on the 85th minute when Morelos got on the end of a deflected cross and guided his header into the bottom corner to score his first goal of 2020.
Arfield rubbed more salt in the Hamilton wounds as he added a sensational fourth in the final few minutes.
A clearance by Brian Easton only went as far as Arfield and he fired a missile into the top corner past a helpless Southwood.
Following the draw on Sunday evening, Rangers have been drawn away to Hearts.
Full Time- Hamilton 1-4 Rangers
Southwood, McGowan, McMann, Collar, Davies (Ogkmpoe, 35) Gogic, Winter, Easton, Dales (Miller, 35 (Alston,45)), Smith, Hamilton.
SUBS NOT USED: Gourlay, Hunt, Moyo, Want.
McGregor; Tavernier, Goldson, Edmundson, Barisic (Halliday, 68); Kamara, Aribo, Arfield; Kent (Stewart, 81), Hagi (Davis, 73), Morelos.
SUBS NOT USED: Foderingham, Katic, Jones, Polster
Referee- Alan Muir
Goals- Arfield(25,90), Smith(38), Aribo(68), Morelos(85)
Yellow Cards- Winter(19), Gogic(53), Halliday(78)
Red Cards- N/A