An incredible Ulster recovery from 12 points down earned them a dramatic win over Edinburgh to reach next Saturday's Pro14 final against Leinster.
Tries by Stuart McInally, Darcy Graham and Chris Dean had given Richard Cockerill's side a 19-7 lead.
But Rob Herring and John Andrew's tries added to Rob Lyttle's earlier score as the visitors drew level with only five minutes left.
And Ian Madigan's 80th-minute penalty secured Dan McFarland's team victory.
Ulster will take on six-time winners and current defending champions Leinster at Dublin's Aviva Stadium in a repeat of the 2013 Pro12 final.
Ulster had looked in all sorts of trouble at various points in the Murrayfield semi-final, but when the heat truly came on, they came alive. Ulster grew and fought like men possessed. Edinburgh folded. A huge victory for McFarland's men, what a crushing blow for Cockerill.
The winning penalty might had been a touch controversial but Ulster deserved this win. Having put over a fantastic conversion from the touchline to level it, Madigan then scrambled over the winning kick. His mentality, and the mentality of the Ulster team, was so far superior to their counterparts in the game's defining moments.
Edinburgh went ahead early when the visitors were ground down under heavy pressure, McInally barrelling down the blindside of a maul to blast his way over. The conversion was missed by Jaco van der Walt, but it was the kind of start that Cockerill would have been dreaming about.
McFarland would have closed his eyes in quiet frustration. Coming into this semi-final shorn of key players and confidence - and with four straight Pro14 semi-final losses on their record - they worked themselves into terrific positions in the wake of McInally's try but could not make any of them stick. In the relative silence of Scotland's national rugby stadium, you could almost hear McFarland sigh.
At the end of the first quarter they had three cracks at nailing a five-metre lineout and could not do it. Edinburgh's defence and their work on the floor, led by Hamish Watson, was too much for them. Ulster came again - and got foiled again.
McFarland took off John Cooney at the break, bringing on Alby Matthewson in the hope of making something happen. Matthewson was still getting to the pitch of the game when his team fell further behind. Where Ulster failed to take advantage of pressure in the opposition 22, Edinburgh succeeded. It was all about patience and control and when, it mattered, clinical finishing.
Van der Walt was at the root of it, sniping from close range, drawing in the defenders and slipping in Graham for a try that the fly-half then converted. At 12-0 it looked like Edinburgh had a place in the final in the bag.
Ulster stirred, though. When they started playing with a bit of risk in their game they became an altogether different proposition. They started to offload and get in behind Edinburgh, who suddenly looked vulnerable. Lyttle's try was a peach. The wing finished with style, his footwork taking him past Watson and all the way to the posts.
Burns' conversion made it 12-7. Watson's belligerence with ball in hand followed by his beautiful offload to Dean brought Edinburgh's third try. With a quarter to play, what did Ulster have left in them?
A lot, as it turned out. Everything, if truth be told. They were steely and hungry and unstoppable. The dramatic last quarter kicked off when Herring was driven over a by a pack of forwards that were now doing a number on their hosts.
The power of the visitors scared the wits out of Edinburgh. The hosts had lost themselves amid the barrage. Their attacking game evaporated, their discipline went with it. Andrew powered over from close range to make it 19-17. Madigan's magnificent touchline conversion levelled it.
Edinburgh had physically and mentally collapsed in the wake of Ulster's outstanding pressure, the final flourish added by Madigan with that last-gasp penalty. A sensational comeback from Ulster. Drama and a deserved place in the final.
Edinburgh: Kinghorn, Graham, Bennett, Dean, Van Der Merwe, Van Der Walt, Groom, Sutherland, McInally, Nel, Toolis, Gilchrist, Bradbury, Watson, Mata.
Replacements: Taylor for Dean (59), Shiel for Groom (76), Schoeman for Sutherland (52), Willemse for McInally (69), Berghan for Nel (48), Davidson for Toolis (69), Ritchie for Mata (64). Not Used: Chamberlain.
Ulster: Stockdale, Ludik, Hume, McCloskey, Lyttle, Burns, Cooney, O'Sullivan, Herring, O'Toole, A. O'Connor, Carter, Rea, Murphy, Coetzee.
Replacements: Lowry for Ludik (41), Madigan for Burns (70), Mathewson for Cooney (41), McGrath for O'Sullivan (52), Andrew for Herring (70), M. Moore for O'Toole (52), Treadwell for Carter (49). Not Used: Reidy.
Ref: Frank Murphy (Ireland).