Glasgow 18 Edinburgh 29
Edinburgh upset a planned Glasgow parade to honour departing coach Gregor Townsend and retiring winger Sean Lamont with a 29-18 Guinness PRO12 win at Scoutstoun.
Townsend is moving on to take over as Scotland head coach now the Warriors' season is over and signed off by bringing the 1872 Cup back to Glasgow 43-41 on aggregate following their 25-12 victory in December.
An unconverted try from Jonny Gray sent Glasgow into the half-time interval with an 11-9 advantage but it was after the break where Edinburgh took over.
Former Glasgow player Duncan Weir, who kicked perfectly, had put over three penalties before the break and he added two more early in the second half.
Glasgow's only success in the second half was a try from Stuart Hogg converted by Finn Russell.
Edinburgh breached the Warriors' defence with tries from Damian Hoyland and ex-Glasgow full-back Glenn Bryce.
It took only seventeen seconds for Glasgow to take the lead with a Russell penalty.
However, a penalty from Edinburgh opposite number Weir, in the sixth minute, brought them level and it was into first-half stoppage time before the hosts were again ahead.
Benefiting from a strong wind, Edinburgh kept play in Glasgow territory and Weir put them ahead with a penalty after 13 minutes.
Russell's strike levelled things again three minutes later and under pressure Edinburgh had two men sent to the sin-bin by referee Mike Adamson. Hooker Ross Ford was the first to go for a high tackle and scrum-half Sam Hidalgo-Clyne followed him for repeated infringement.
Weir's third penalty kept Edinburgh ahead until young lock Scott Cummings' clever offload put his fellow second-rower Gray over for the try that allowed Glasgow to go in leading 11-9.
Weir added two penalties in the opening 15 minutes of the second half to put Edinburgh back ahead.
Edinburgh's first try was scored after 57 minutes by winger Hoyland following good phase play, with Weir converting.
Stuart Hogg carved through the Edinburgh defence to touch down after 66 minutes and it was converted by Russell.
Russell then missed badley from in front of the posts and it was the visitors who made sure of victory on the day when full-back Bryce forced his way over in the final minute with Weir converting.