Connacht’s fairytale season ended with an appropriately magical finale as they beat four-time champions Leinster to win the Pro12 for the first time.

Pat Lam’s men produced a mesmeric, breathless and thoroughly convincing performance in Murrayfield on the way to a 20-10 win.

In a season where Connacht finished in their highest ever league position, qualified for their first ever major final and filled five places on the Ireland team that finished against Italy in the Six Nations, they had to believe that victory was within their reach.

And so it was. Trailing 15-0 at the break, Leinster clawed their way back to 20-10 with just over ten minutes to play.

But there was rarely a moment in the course of a free-running 80 minutes that it looked like Connacht might consider defeat.

Lam was able to name the same XV that beat Glasgow last weekend, the first time this season that he had that luxury.

Leinster lost Isa Nacewa to an arm injury but 72-cap international Rob Kearney returned to the side, while second row Devin Toner was unavailable for personal reasons.

Connacht soaked up wave after wave of pressure for the opening seven minutes without a hint of giving away a penalty, and when Leinster eventually spilled the ball, away they went.

The league’s top try-scorer Matt Healy chipped ahead and won a Connacht lineout five metres from the Blues try-line.

Connacht’s attack was repelled and when the ball came to Johnny Sexton to clear, the out-half had other ideas and spun the ball out along his own try-line to start a move that only finished in the opposition 22.

And sure enough, back came Connacht with the same plan, only this time executed to perfection.

Healy, not included in Joe Schmidt’s touring squad for South Africa, came off his wing to cut a line through the midfield where the Leinster defenders generally ignored him.

He found Tiernan O’Halloran, who seemed to be covered by both Heaslip and Rob Kearney, but in the end, ran 40 metres untouched. AJ MacGinty converted.

They came close again moments later when after at least a dozen passes, Henshaw slighted overcooked his grubber for Healy.

Leinster booted it long this time but another green wave arrived and it required a solid tackle on Niyi Adeolokun to prevent another run in.

But three minutes later the Nigerian got his score.

Bundee Aki, Kieran Marmion and more combined to find the winger, who chipped over his marker and won the race to the ball to fall over the line. It was a try of the season contender.

Lam’s men were irresistible, but could they keep up the pace?

Robbie Henshaw and Aki were everywhere, Adeolokun did a jig on the sideline, beat his man and the move only ended when Leinster slapped the ball down at a ruck.

It was the 26th minute and the first penalty of the game.

MacGinty slotted it for 15-0 and the Connacht fans were in full voice, the Fields of Athenry echoing around the famous Edinburgh stadium.

Eventually, there was a Connacht error, a knock on in midfield: Ben Te’o, anonymous to this point, already in England mode perhaps, tapped the ball into the 22 but MacGinty retreated on a clever line to gather ahead of the centre.

Connacht soon regained the momentum, Aki launching himself into Sexton’s midriff the catalyst for a penalty to Connacht.

Somehow it took until the 35th minute for the greens to infringe, Nigel Owens extending his arm when their scrum fell apart.

Leinster’s first penalty came to nothing, the same total as all their first-half efforts.

Only once in Pro12 final history has the team that trailed at half-time come back to win - that being Ospreys, who overturned a 17-9 deficit against Leinster in 2012. 

An Aki knock on at the start of the second half led to a Leinster penalty, this time straight in front of the posts and Sexton got the 2013 and 2014 champions on the board.

The Westerners then had the chance to cancel those three points out but MacGinty’s long-range shot fell short.

The men from the west came again. Running a penalty advantage, the ball found hooker Tom McCartney on the 22, he ducked inside one tackle, put his foot on the gas and stepped Lions winger Luke Fitzgerald.

Sexton led three chasers who just about held up the forward on the line.

Then instead of calming things down, Dave Kearney ran a ball from his own line but made it only as far as his 22 before being turned over.

MacGinty, playing his last game for the province before moving to Sale, dabbed a delicate ball through that hopped up perfectly for Healy to dot down.

The USA international missed the extras but Leinster still had a mountain to climb at 20-3 down with just over a quarter to play. 

And it was Dave Kearney who tried to take the first step back. The Ireland winger broke the line off Sexton’s inside pass and the ball came to Zane Kirchner, on for Rob Kearney.

The Springbok sold an outrageous dummy to Adelokun before barging over the line.

No try, said Owens, as he pulled the play back for a forward pass, a decision that looked harsh, even after several replays on the big screen.

But with 13 minutes to play, Leinster had their foothold. Sean Cronin, who replaced Richardt Strauss at the start of the half, finished off a side-to-side move, with Connacht temporarily down with 14 men as Tiernan O’Halloran got treated on the ground. 

Sexton kicked the conversion, the Blues fans found their voice and Connacht, now looking tired, had ten minutes to hang on.

But it was the underdogs who found their second wind, capitalising on a series of errors to see out the game close to the Leinster line and make history.

Fittingly captain John Muldoon, inspirational in this game and all season for the province was man of the match. It’s rugby’s own version of Leicester City.

Connacht: O'Halloran, Adeolokun, Henshaw, Aki, Healy, MacGinty, Marmion, Loughney, McCartney, Bealham, Dillane, Muldowney, McKeon, Heenan, Muldoon, J. Cooney.

Replacements: O'Leary for O'Halloran (68), J. Cooney for Marmion (60), Ah You for Loughney (68), Heffernan for McCartney (71), Browne for Dillane (61), O'Brien for McKeon (41), Robb for J. Cooney (65).

Not used: J. Cooney.

Leinster: R. Kearney, D. Kearney, G. Ringrose, Te'o, Fitzgerald, Sexton, Reddan, J. McGrath, Strauss, Ross, Molony, M. Kearney, Ruddock, Murphy, Heaslip.

Replacements: Madigan for D. Kearney (75), Kirchner for Te'o (60), L. McGrath for Reddan (57), Dooley for J. McGrath (71), Cronin for Strauss (41), Furlong for Ross (41), Conan for Molony (62).

Att: 34,550.