No goals and few clear chances but nearly 50,000 Irish spectators left the stadium satisfied after watching their team give as good as they got against a team who will be among the favourites if they reach next year’s World Cup. Portugal will do that as winners of Group A if they avoid defeat to Serbia on Sunday. But they were grateful to depart from Dublin with a point after being flustered by Stephen Kenny’s bright Irish team, who spent the final 10 minutes pressing for victory after Pepe was sent off for a second bookable offence.

“We’re proud of how the team played against one of the best teams in the world but we’re a little disappointed not to have won it,” said Shane Duffy, whose performance in the heart of Ireland’s back three helped to keep Cristiano Ronaldo off the score sheet.

Ireland’s World Cup qualification hopes are long gone but this draw means they could finish third in the group if they win in Luxembourg on Sunday, and that would be a fitting way to underline the progress made since March’s home defeat by the same opposition. That was the nadir of a reign by a manager who is now inspiring belief that his style revolution could really work. This performance increased the likelihood of him being awarded a new contract to guide Ireland through Euro 2024 qualification.

“You can see how the team has evolved,” said Kenny. “I’m building a team here. We went through a really difficult period, but you can see what we’re doing.”

Performing in front of a full house in Dublin for the first time since the start of the pandemic, Ireland rode into the game on a wavelet of optimism. Portugal came in cautious mood, with Fernando Santos leaving several key players on the bench to preserve them for the Serbia game.

Séamus Coleman made sure the hosts did not give their illustrious visitors too much respect: when Ronaldo went down clutching his right leg in the third minute after being dispossessed near midway, the Ireland captain waved vigorously at his teammates to play on rather than put the ball out for the Manchester United player to receive treatment that, it turned out, he did not need. Portugal still forced Ireland to play without the ball for most of the first 20 minutes. That is not how Kenny likes it but a country of Ireland’s limitations need to know how to do it well. They did so.

In the eighth minute Ronaldo tried to teach Coleman a lesson by dashing past him in the box, but the Everton man recovered to divert the forward’s shot out for a corner. Gavin Bazunu did not have a save to make until the 14th minute, when he pushed away a shot by André Silva after a quick free-kick.

Coleman foiled Ronaldo again three minutes later, flinging himself in front of the striker’s shot from 12 yards after Gonçalo Guedes got in behind Ireland down the right.

Rui Patrício was not called upon until he rushed out of his box to prevent Chiedozie Ogbene from seizing on a weak back pass. In the 26th minute the Rotherham winger led Ireland’s first dangerous attack through a break that started in the home box with Matt Doherty and concluded with Callum Robinson’s curling shot from wide on the left. Patrício dived to push it away. By the end of the first half Ireland were passing and moving with confidence, causing plenty of discomfort to Portugal. Ogbene could have opened the scoring before the interval but headed wide from a cross by Robinson.

Ogbene had a good game all round, troubling the visitors with his strength and directness. When Matheus Nunes was flustered into giving the ball away in his own box in the 53rd minute, Ogbene tapped it to Josh Cullen, who tried to curl it into the bottom corner from 20 yards but his shot was too weak to beat Patrício.

Cullen and Jeff Hendrick delivered polished performances in midfield, where Bruno Fernandes did practically nothing for Portugal – until starting a move in the 66th minute that should have resulted in a goal. But Ronaldo, to his own disbelief, headed wide from seven yards after a cross by Silva.

Fernandes was withdrawn soon afterwards as Santos tried to jolt his team into action.

But Ireland were the next to threaten, Enda Stevens lifting a shot over the bar after more excellent work by Ogbene. Then Pepe ruled himself out of the Serbia match, earning a second yellow card by clumping into Robinson, who reacted in a way that must have both annoyed and impressed Pepe.