Dunfermline almost pulled a goal back with Declan McManus' free-kick beating Rangers keeper Jack Alnwick but coming back off the crossbar.

Miller set up two goals in quick succession with passes that allowed Morelos and Tavernier to find the net.

Pars boss Allan Johnston introduced defender Jean Yves Mvoto for attacker David Hopkirk as the visitors made it until the break without losing any more goals.

But Rangers found their rhythm again in the second period with midfielder Candeias taking over free-kick duties from Alves, who had been replaced by Danny Wilson, and beating Murdoch from a similar distance to his countryman's earlier strike.

Morelos pounced to knock home after Murdoch parried a drive by Tavernier.