Richard Cockerill marked his first home Guinness PRO14 match in triumphant style as his Edinburgh Rugby side delivered a bonus-point win over the Dragons at Myreside.
The impressive Blair Kinghorn scored in the first half, but nine points from the boot of Gavin Henson kept the Welsh region within touching distance.
Sam Hidalgo-Clyne’s second-half try threatened a breakaway only for Henson to once again successfully kick three times in the space of nine minutes to set up a frantic conclusion.
But replacement Solomoni Rasolea crashed over while Robbie Fruean, who crossed in the game’s dying embers, secured Cockerill a bonus point and a happy home welcome to the PRO14.
It was the Dragons who found their footing first, at times camped in the Edinburgh 22 as wave after wave looked destined to see the scoreboard troubled in the early stages.
That came thanks to Henson’s first penalty on 11 minutes, and just four minutes later a well-executed drop goal saw the Dragons double their lead as Cockerill’s side were put under pressure.
The home sides won the two meetings last season, but it took until the 23rd minute for Edinburgh to get their first home points of the campaign, thanks to Weir.
The Scottish international levelled up shortly after and, with momentum behind them, notched the first try of the game on the half-hour through a piece of brilliance.
The ball was whipped wide to Chris Dean, darting his way between four tackles before offloading to Kinghorn, with the full-back left with the easy task of dotting down and giving the hosts the lead.
Weir added the extras but the celebrations weren’t to last for long as he went in the sinbin, while Henson notched his second penalty, narrowing the half-time score to 13-9.
The first score of the second half always looked key, and it was Kinghorn at the heart of the action once again to ensure Edinburgh some breathing room.
He glided his way through the Dragons defence, supported perfectly by Hidalgo-Clyne, taking the offload with precision and crashing under the posts for another score.
Three more Henson penalties set up a tense finale however as the score narrowed to 20-18, though an offside infringement ensured Weir would get his boots dirty, with success, once more.
And as the clock ticked into the final ten minutes, a third try was to come the Scottish side’s way, hitting back through replacement Rasolea thanks to excellent work in the take by wing Damien Hoyland, starting a move that finished with an equally-impressive delayed pass by Freuan.
Freuan himself was not to be denied on debut, dotting down with just four minutes left on the clock, leaving Edinburgh to celebrate a strong opening home display in this season’s Guinness PRO14.