Two years after being crowned as champions for the first time, Mortonhall regained the title with a 5-4 win over Broomieknowe in the final at Royal Burgess.
Captain Ian Dickson was the matchwinner at the Barnton venue, beating his Broomieknowe counterpart Alan Sim in the deciding game.
Sim was one up with two holes to play, but a good up and down at the 17th by Dickson squared the match.
As the players from the finished matches watched on, Dickson then birdied the last after hitting his drive pin high and then playing an excellent chip shot that ended up close enough to be conceded.
It was a sore end for Broomieknowe after appearing to have one hand on the trophy, which they last lifted in 1990.
In a cracking final, five of the nine matches went down the 18th hole, with Broomieknowe taking an early lead by winning the first two matches.
Mortonhall hit back by taking the next two matches, but it was advantage Broomieknowe again at 3-2 before the match really came alight at the bottom of the order.
Mortonhall now go on to represent Edinburgh in the Inter Cities Cup against the winners of the Glasgow Boundary Bell.
Match details (Mortonhall names first): G Nicolson lost to J McIntosh one hole; S Scott lost to S Marc 4&3; A Main bt N Webster one hole; G Fraser beat S McGarvey one hole; J Grant lost to G Reid 4&3; B Buchan bt K Hastings one hole; A Hogg lost to J Ross one hole; G Clark bt A Brooks 5&4; I Dickson bt A Sim one hole.