IT can be tempting, when things have not gone your way for an hour or more, to conclude that it's just not going to be your night.

To tell yourself that you've given it your best shot, and there is no disgrace in losing to opponents who have been slightly sharper in almost every aspect of the match.

With five minutes to play on Friday night, there must have been more than a few Glasgow supporters who were preparing to succumb to that temptation. The Warriors themselves, however, resisted it wholeheartedly, and were rewarded with a breathtaking victory at the death.

While the score was always close, Ulster had had the edge for most of the match, and, with a five-point lead going into those closing stages, looked set to win the PRO12 play-off semi-final and go through to a final at their own Kingspan Stadium against Munster on Saturday. But Glasgow, after toiling to find a rhythm, equalised through a DTH van der Merwe try, and Finn Russell's nerveless conversion gave them a 16-14 win.

The result, acclaimed raucously by a capacity Scotstoun crowd, was testament to the unshakeable self- belief of Gregor Townsend's squad. At times earlier in the game they had tried too hard to force openings in an obdurate Ulster defence, as if unsure that their chance would come. But when it mattered most they retained their poise and patience to claim their place in the final for the successive second year. The task now, of course, is to go one better than in 2014, when they lost 34-12 to Leinster.

"Our goal as a squad is to win a trophy: to be the first Scottish team to win a trophy," scrum-half Henry Pyrgos said. "It's great to get here.

"Learning from last year, it wasn't a case of winning the semi and maybe not turning up for the final. Leinster just played very well.

"But we know that this week we'll have to work extremely hard, recover well, because that was a tough game, and come into training and just do everything we can to put in a slightly better performance in our areas next weekend."

It goes without saying that the aim is to play at your best in every game. But the key to victory on Friday was the Warriors' mental resilience when they knew they had not played close to their best at all.

"I think we believed the whole game," Pyrgos continued. "The set-piece was tough. We didn't get a lot of ball. They're a top side, we knew that coming in, and they put us under pressure.

"But I think we showed the character there is in the team when we managed to stay in the game when we weren't playing well and, at 8-6 down at half time, hadn't really done a lot.

"I think a lot of it was unstructured play. We had a lot of turnovers from line-outs. We were expecting to attack and it didn't happen. A lot of kicks went through and we lost it.

"Disorganised defence put us under a lot of pressure. There was a lot of confidence in the changing room [at half time]. We felt if we could just get a bit of ball and put them under pressure - which we hadn't really managed to do, we spent a lot of time in our half - we could get into the game.

"They've got a lot of good players and they put us under a lot of pressure. We were on the back foot for a lot of it, but only conceding one try under that much pressure was amazing, really. That kept us in the game and gave us the opportunity to score one try and win it.

"We've got a lot of guys in our team who can make something out of nothing. If we get a bit of ball, find a bit of space, there are always chances we can make something happen.

"Only being 8-6 down at half time was amazing. At 14-9 down at the end we knew the converted try was still there. We have a lot of good players. We just needed a bit of ball."

After seeing his team perform markedly better in the second half than the first against Ulster the previous week, head coach Townsend had said an 80-minute effort would be needed on Friday for his team to prevail over Ulster.

He was right, but the win was about a lot more than mere effort. A no-less- essential element was Glasgow's increasing maturity in handling the big occasion.

"You see it in a lot of big sporting events," Pyrgos added. "Teams don't always play as they want to do, but if you're in the game till the end you have a chance and thankfully we had a chance and put it away."

The Warriors will plan to play better in every aspect of the match against Munster, and will certainly not want to be chasing the game in the dying minutes, no matter how well they handled such a situation on Friday.

But the way in which they achieved their last-gasp win against Ulster can only have boosted their self- confidence and that experience will do them no harm at all if they again find themselves needing a seven-point score with little time to get it in a final that is likely to prove every bit as tense as the semi- final was.