And while the victory was hard fought, the home side netted vital goals at vital stages to move to within two points of leaders, Sligo Rovers.
Indeed, the ‘Hoops’ will feel hard done-by having bossed the ball for so long, but they failed to turn that advantage into goals
In a first half which proved tense, Rovers went close in the 32nd minute, Ronan Finn’s powerful effort was parried by Derry keeper, Ger Doherty, before Dermot McCaffrey hacked the ball clear.
At the other end, in the 42nd minute, Barry McNamee played Rory Patterson into the clear but Rovers centre-back, Derek Foran, did well to get back to deny the Derry striker with a timely tackle.
However, after the break the home side moved up a gear and began to stretch the Rovers back four.
And roared on by the Brandywell’s biggest crowd of the season, the Candystripes broke the deadlock following a flowing move in the 50th minute.
Patrick McEleney floated in a deep cross from the right and Barry McNamee’s header crept in at the far post.
Rovers had introduced midfielder Gary McCabe following the goal and top hitman, Mark Quigley, also entered the fra within minutes as Derry continued to defend their slender lead.
And they netted that vital insurance goal in the 79th minute and the Hoops were in trouble.
McNamee floated in a corner from the right and centre-back, McBride, rose majestically to powerfully head the ball home giving Murphy not chance.
Rovers refused to give up and substitute, Stephen Rice, reduced the deficit in the 89th minute when driving a low shot to the net following a corner. But it was a case of too little, too late as Derry continued to battle at the business end of the table, taking full advantage of Sligo’s defeat by St. Pat’s.
DERRY CITY: Doherty; Madden, McBride, McCaffrey, Crawley (Curran, 84); Molloy 8, Higgins; Kavanagh (McEleney, 9), McNamee; Rafter (Duffy, 73), Patterson.
SHAMROCK ROVERS: Murphy; Sullivan, Elebert, Foran, Powell; O’Connor (McCabe, 59), Chambers, Finn, Dennehy; Kilduff (Quigley, 65), Sheppard.
Referee: D. Tomney (Dublin).