It was a night of exhilarating joy for the Republic of Ireland and at the final whistle, with players in red shirts collapsing to the ground, excruciating pain for a Wales team whose latest attempt to qualify for a World Cup finals, desperately wishing to play in their first tournament since 1958, has ended unsuccessfully once again.

Gareth Bale, like Ryan Giggs, Ian Rush and all those others, will just have to wonder when, if ever, that chance will come and, boy, did Wales miss their most celebrated player during that jarring, nerve‑shredding finale when they seemed to run out of ideas and Tom Lawrence, with one last free-kick to drop into the penalty area, let the nerves get the better of him. His cross missed everyone, went out for a throw-in, and there was a roar of joy and relief from the only corner of this stadium that was not a sea of red.

It was not long until the victory was confirmed, the celebrations started for real and the team led by Martin O’Neill could start looking forward to the play‑offs, with the draw to follow next Tuesday 17 October.

Cardiff in full voice but Republic of Ireland fans sing longest and loudest | Stuart James Read more

How many times have Ireland done this over the years? They came here, unashamedly, for a 1-0 win and their game‑plan went exactly as they hoped: soaking up long spells of pressure, accepting their opponents would have more of the ball but making sure, in telling positions, they did better things with it.

James McClean’s goal, 12 minutes into the second half, was a beauty and once they had the lead an air of inevitability started to descend. Wales had so much of the ball in the last half hour but their play became riddled with tension and they came up against a team, camped in their own half, who gave everything to hold on.

It was typical Irish glory, using all the traits that have helped them on their most illuminating nights, with unlikely heroes such as Shane Duffy and David Meyler, and the Group D permutations always meant one team had to drop out.

Wales have come so far under Chris Coleman, most notably that journey to the Euro 2016 semi-finals, but they met their match here and ultimately they were reminded about the miseries this sport can produce. Their crowd sung one of the more memorable renditions of Hen Wlad Fy Nhadau, belted out a cappella, you will ever hear. Yet it ended with their first competitive defeat on home territory since September 2013 and legitimate questions about whether Coleman, with his contract due to expire in the summer, will continue.

Play Video 1:20 Republic of Ireland's Martin O'Neill: 'We had to come here to win in Cardiff' – video

Ireland’s players chased everything. They were quick in the tackle, faced down their opponents when another team might have crumpled, and did all the things that are considered essential for wearers of that shirt. True, there was not a great deal of refinement from O’Neill’s men but there was a great spirit of togetherness and to give them their due, it was a beautifully taken goal that changed the complexion of the group, with such serious ramifications for the hosts.

Unfortunately for Wayne Hennessey it was also a personal ordeal bearing in mind the Wales goalkeeper started it, with his throw putting Ashley Williams in trouble. Williams has had a difficult start to the season for Everton and, straight away, he looked vulnerable. Jeff Hendrick was on him in a flash, taking the ball and spinning down the right touchline.

Hendrick’s cross was aimed towards Harry Arter but McClean was following in. Arter’s dummy was exquisite and McClean struck his right-foot shot, first‑time, with power and precision, arrowing into the bottom corner.

Chris Coleman admits Wales tenure may be over after World Cup heartbreak Read more

McClean’s first contribution of the night was the kind of bone-rattling challenge, with Aaron Ramsey the unfortunate recipient, that was a throwback to the time Roy Keane introduced himself to Marc Overmars, the old-fashioned way, on the day Ireland qualified for the 2002 tournament. Later McClean and Meyler caught Joe Allen in a sandwich that left the Wales midfielder with concussion, putting him out of the game after only 37 minutes. It looked suspiciously like Ireland’s players might have targeted one of the opposition’s better players. “You will have to ask Ireland that,” Coleman said. “If he was [targeted], they did a good job.”

Yet he did not pursue those complaints and was more concerned about the way “our imagination, offensively, and creativity wasn’t enough – we needed the first goal and started getting rushed and frustrated”. Allen’s absence, the manager admitted, was a considerable loss and despite the late onslaught, his team’s best chance actually came at 0-0 when Darren Randolph turned Hal Robson-Kanu’s header from a corner over the crossbar.

The anguished screams when James Chester’s header flashed into the side-netting told another story about the tension of the night and up in the stands Bale was on his feet, mistakenly thinking it was in. He was wrong and by the end, the contrasting emotions between the two sides was a reminder about brutal and euphoric football can be. “We might lack a few things but courage is not one,” said a jubilant O’Neill.