Edinburgh (21) 35
Tries: Callam, Blair, Webster, Cairns
Cons: Godman (3)
Pens: Godman (3)
Glasgow (9) 31
Tries: Low, Brown, Parks
Cons: Parks (2)
Pens: Parks (4)
Edinburgh hit back to snatch a last-gasp victory over Glasgow in the Magners League derby at Murrayfield.
The home side romped to a 21-9 half-time lead with tries from David Callam and Mike Blair and 11 points from Phil Godman's boot.
Moray Low added a try to Dan Parks's three penalties for Glasgow but Simon Webster's try took Edinburgh clear.
But the Warriors surged in front with scores from Kelly Brown and Parks before Ben Cairns scored at the death.
Glasgow were hoping to end a 27-year run of defeats in the Scottish capital but the defeat meant Edinburgh leapfrogged the Warriors to go fifth in the Magners League.
Edinburgh: Cairns, Turnbull, De Luca, Houston, Webster, Godman, M. Blair, Jacobsen, Ford, Kerr, Mustchin, Gissing, Hogg, Rennie, Callam.
Replacements: Southwell, Kelly,
Allori, Hamilton, Reid, Meyer, D. Blair.
Glasgow: Stortoni, T. Evans, Morrison, Gibson, O'Hare, Parks, O'Young, Va'a, Thomson, Low, Newman, Kellock, Brown, Barclay,
Replacements: Barrow, Gregor, Pinder, Kalman,
Eddie, Turner, Milligan.
Ref: Andrew Small (RFU).