It was not Rangers' most convincing performance of the season – they missed a bundle of chances – but it was good enough to lead them to a fourth successive victory, a period in which they have scored 18 goals and conceded just two.
They may not be the indomitable force they once were, but there will be more than a few clubs – some Scottish Premier League outfits among them – eager to avoid the Ibrox side when the draw for the fifth round is made at Hampden this afternoon.
A good afternoon for Rangers was bolstered by the return of David Templeton as a late substitute for his first appearance since mid-September. Templeton sparkled on his Ibrox debut – also coincidentally against Elgin – before being injured in the following match, and his warm welcome was an indication of how much he has been subsequently missed. It was another winger, though, who stole the show.
Barrie McKay is a throwback to another era, a touchline-hugging entertainer, all mazy runs and enticing crosses that just beg to be touched in.
His performance was the key to Rangers' victory although, four weeks short of his 18th birthday, he wasn't allowed to accept the prize that normally comes with being the game's star turn. "He's only 17 so he couldn't accept the champagne for being man of the match," Kevin Kyle revealed. "I was happy to take it for him."
McKay should have had an early assist – a Kyle strike was ruled out for offside with replays suggesting he may have been on – but, undeterred, he kept plugging away. McCoist later said he felt it was the most consistent game the winger had played as McKay called for possession time and again with his team-mates more than happy to give it to him.
Elgin just didn't know how to deal with him. One lightning quick burst by McKay took him beyond the defenders but the cutback found no takers. Then a corner was met by Chris Hegarty but headed wide, while another sumptuous cross was headed over by Kyle.
Perhaps frustrated, McKay elected to take matters into his own hands the longer the stalemate went on.
His finishing, though, was not to the standard of his running and crossing, one shot tamely gathered by Elgin goalkeeper John Gibson, another dribbling wide. It was somewhat a surprise, then, that McKay was not involved when Rangers edged in front just before half-time.
It was a basic but effective move, Lee McCulloch hoisted a long ball to Kyle who nudged it on to Dean Shiels. The Northern Irishman took a touch before sliding it beyond Gibson at the far post for his eighth goal of the season
Elgin spent most of the game in retreat but were not without a smattering of chances of their own. Mark Nicolson burst forward and lashed a shot that Neil Alexander saved, while Craig Gunn, Elgin's top scorer, could only shoot tamely at the goalkeeper. The visitors probably should have drawn level early in the second half but Leslie could only slide the ball into the side-netting. It was a warning to Rangers that the tie was far from over.
The home side continued to enjoy the bulk of possession without greatly troubling Elgin's defence. When they did wriggle free from their markers to get a shot on target, they either couldn't find a way past Gibson – who saved brilliantly from Shiels – or their finishing was woeful, with Shiels, Kyle and Lewis Macleod all failing to hit the target from promising positions.
McKay was quieter in the second half but still had a hand in the second goal that ensured Rangers' safe passage through to the fifth round, swinging in a corner that Kyle stooped to head past Gibson.
The big striker had endured an awkward afternoon - very little came off for him - but the goal was a reward for his perseverance and determination.
That seemed to be that, although an excellent reaction stop by Alexander denied Sean Crighton from Daniel Moore's corner, while Leslie's goalbound effort was later blocked on the goal line by substitute Darren Cole. It was another young player who completed the scoring.
Cole fed fellow replacement Kal Naismith and he applied a composed finish just three minutes after appearing from the bench for his first Ibrox goal.