Kevin O’Brien played Ireland back into the historic maiden Test match in Malahide as the Dubliner carefully crafted a sensational century against Pakistan.

Renowned for his big hitting and quick scoring, O’Brien has immediately proved himself a Test-quality batsman with a flawless innings on the fourth day of Ireland’s first foray into the traditional form of the game.

And O’Brien’s knock, complemented perfectly by a century partnership with Stuart Thompson, ensured that this maiden Test encounter on Irish soil would progress into the fifth and final day as Ireland finished on 319 for seven.

Pakistan will need to claim three wickets in the morning and then chase down a decent total – currently 140 runs – to win the one-off Test match on the final day, and with some rain forecast for the north Dublin venue on Tuesday, there is still a chance that Ireland could come out of this encounter with a draw or better.

But O’Brien was the man of the moment and the history-making batsman admitted after the game that it proved a very emotional moment as he hit the shot to take him into triple figures.

"It was a very proud and emotional moment," O’Brien told RTE Sport after the end of play. 

"It was just relief really, and I was emotional, the first Test and all that.

"It was just a great honour to join, I’d say, a fairly small list of players that have done it.

"It’s nice to be on the imaginary honours board here in the portacabin changing rooms," laughed O’Brien.

"So hopefully when Abbotstown is fully built, I can get my name up there."

And the batsman also had strong words of praise for Stuart Thompson and Tyrone Kane who provided strong partnerships as he achieved the feat.

"Tommo batted unbelievably, and brilliantly after tea. He just hit the ball so sweetly and scored very quickly and took the pressure off me.

"It was a great innings by Stuart and then TK to bat 60 or 70 balls in tough circumstances against a quality attack, hats off to the two guys."

Thompson admitted that emotions were high inside the dressing room as the Ireland team, including O’Brien’s older brother Niall watched on.

"I think we were probably more nervous than he was," said Thompson.

"Counting down those last five runs was agonising but there was a huge celebrations when he did it.

It was a huge knock. He always seems to rise to the big occasion. We set out to bat all day and the fact that he is still not out sitting in the dressing room on 118, it shows what sort of player he is and what sort of character he is." 

And O’Brien emphasised the support he receives from his family and friend as he heads back to trawl through the huge amount of congratulatory messages he just received.

"Mum and Dad don’t miss a game. My wife was here as well and obviously Niall in the side as well.

"So very proud, I just got about 85 WhatsApps from the family group so it will take me a couple of hours to read through them.

"It’s good to have support from the family and friends."

The fourth day began where it left off on Sunday with Ed Joyce and William Porterfield in prime position to set Ireland up to bat for the day, with that fifth day a mere aspiration at 11am on a dull and overcast morning in Malahide.

The consistent quality that Ireland have faced in this Test emphasises the fact that they face a long hard road ahead before they can feel comfortable and regularly compete in this format.

And getting done by the pace and accuracy of some fine deliveries in the first innings shows the steep learning curve ahead, and the quality that Ireland’s next generation will need to aspire to achieving.

But some bad decisions cost Ireland unnecessary hardship in that opening innings, and unfortunately they started to creep back in as the first session got underway.

Joyce and Porterfield played out the third session on Sunday proving their first class credentials, however, the morning was less than three overs old when Joyce ran himself out.

More poor judgement by an Irish player as the opener opted to race for a quick single, but a fine piece of fielding resulted in a direct hit at the non-strikers end and Joyce walked off before the decision was confirmed.

Andrew Balbirnie came out to make amends for his first innings duck but departed five balls later in the same manner as his previous dismissal, lbw by Mohammad Abbas without registering a run.

Balbirnie suffered the ignominy of recording a Test match pair, a duck in both innings.

In his defence, the ball appeared to be travelling over the stumps but with no appeal process available, the umpire’s call was final.

Niall O’Brien, another who was looking to put his first innings duck behind him, fared a lot better and looked to be in good shape sharing the centre with captain Porterfield, easing to 18 off 44 balls.

But then the Pakistan quality shone through as Mohammad Amir’s swinging delivery forced O’Brien to play and miss as the middle and off stumps were ripped out of the ground.

At this stage Ireland were 93 for three wickets but two overs later they lost their fourth wicket as captain Porterfield was also done by some quality cricket as Amir’s full delivery forced the Ireland captain to edge behind with the keeper getting across first slip to take a diving catch.

Paul Stirling and Kevin O’Brien were now a new partnership looking to spend some time in the middle and they got to lunch with ease as the total moved beyond 100 with 30-odd runs between them.

Stirling, however, only managed three overs after lunch before getting trapped lbw by a big inswinging delivery from Abas.

Things were starting to look ominous for Ireland as by this stage, they were still 53 runs away from avoiding an innings defeat with only five wickets remaining.

On the plus side for Ireland, Kevin O’Brien was looking in great shape, as he did in the first innings and again set out to build with Gary Wilson who had got the all clear to play despite getting a bad knock to the arm on Sunday.

Wilson could not repeat the heroics of his first innings showing, as he played through the pain barrier to a fine 33 not out, and could only add 12 runs before nudging one to be caught at slip.

Stuart Thompson raced to 15 as O’Brien neared his half-century with Ireland eventually pushing past Pakistan’s total, ensuring that the visitors would have to bat again.

And it was if a huge weight was lifted from the hosts’ shoulders as Ireland began to build a lead.

O’Brien deservedly took the plaudits as he became the first Ireland cricketer to hit a Test 50, and then moved swiftly on to 60, then 70 and beyond.

Thompson played a fine innings in the shadow of O’Brien but then began to emerge after tea by leading the charge with some perfectly placed hits to the ropes.

Ireland moved past 250 before, a Thompson hook off the back foot, to take on the short ball, brought up the second 50 of the innings, as the 100 partnership was reached.

Pakistan were clearly frustrated and visibly tiring as the third session progressed as they passed 100 overs bowled in this second Irish innings.

Thompson was eventually undone by the spin of Khan, which left just three wickets in hand and the story of O’Brien’s potential Test match century grew more dramatic as he was running out of partners.

Tyrone Kane was next to join the O’Brien in the middle and was tasked with sticking around to allow the century to be completed.

The young Dubliner played the role to perfection as O’Brien edged his way through the 90s to come to rest on 99.

Pakistan brought chief wicket-taker Mohammad Amir back into the attack at that stage to try and unsettle the Irish batsman on the brink of his great achievement. However, O’Brien was equal to the challenge.

"And then they bring on their strike bowler," recalled O’Brien with a knowing smile.

"I was hoping there would be one more over from Shadab [Khan] as I was fairly comfortable against him.

"They sniffed an opportunity to get me out on 99 but thankfully another thick edge went past the fielder and I got two runs.

It was an emotional few minutes and while not a huge crowd on Day 4, the sense of occasion reverberated around this arena as O’Brien set out to become the first Ireland international to secure a Test century.

And then with just a flick of the bat, O’Brien pushed it through point and ran two runs before celebrating the momentous achievement as older brother Niall led the stadium in a standing ovation from his prime position in the players’ pavilion.

But the work still needed to be done and O’Brien and Kane dug in to work through the early evening sun to play through the final overs before the umpires finally called it a day as the clock struck seven.

Ireland will now go into the final day with a decent chance of a draw and an outside chance of creating another ripple around world cricket by securing an unlikely victory against Pakistan.

But O’Brien believes that it is possible and it is something that can still be achieved with a good start on Tuesday morning.

"Hopefully we have put ourselves in a good position where we can go and win it.

"There’s no reason why we can’t so we just have to start off well tomorrow and try and get as many runs as we can and if we get a crack at them, try and get a couple down early and see how we go.

"If we can keep adding to the lead and get up to around 180-odd, it gives us a great chance of hopefully getting a draw but if we can nip out a couple early and get a few to stay low, as they did, then we have a great chance."

O’Brien’s last century for Ireland was his match-winning knock against England at the 2011 World Cup in Bangalore, and while the former still ranks as his most treasured century, that could change on the final day of this Test match.

"I still think Bangalore is still number one, just for the moment it was and against who it was in the Wolrd Cup.

"But if I can continue on tomorrow for another hour and a half and that 118 changes to a 170-odd, then this could top it."