This was the first time Wales had played at the Principality Stadium since 2011 and it turned into an ordeal for Ryan Giggs and his players. Outplayed and outclassed by Spain, his side were comprehensively beaten on a night when the only saving grace was that the scoreline was not more emphatic.

Spain were so much in control it seemed like an exhibition match for Luis Enrique’s team. They raced into a three-goal lead as Paco Alcácer maintained his remarkable start to the season – the Borussia Dortmund striker has scored nine goals in five appearances for club and country, despite starting three of those matches from the bench – and Sergio Ramos silenced the boos that greeted his every touch with a typical header.

Wales v Spain: international football friendly – live! Read more

Ramos’s goal, on his 159th appearance, could not have been any easier as the Spain captain exposed some shambolic Wales defending from a free-kick. A mix-up between Harry Wilson and Joe Allen later gifted Spain their third goal and in many ways summed up Wales’s muddled and disjointed first-half performance. They were 3-0 down with less than half an hour gone and at that point it seemed like an exercise in damage limitation.

Wales improved, helped by Giggs’s decision to scrap a three-man defence who never looked comfortable, although it was hard to escape the feeling Spain were playing within themselves at times in the second half and saving their energies for England’s visit on Monday.

They did eventually add a fourth through the substitute Marc Bartra, whose header took the goal tally to 12 in three games since Enrique took over as manager, although it was Sam Vokes who had the final word with a header in the 89th minute.

Giggs took some encouragement from that late goal and the impact a couple of substitutes made, notably Bournemouth’s David Brooks, who set up that chance for Vokes with a delightful cross with the outside of his left foot, yet the Wales manager made no attempt to sugarcoat what had gone before. “We got taught a lesson in many aspects,” Giggs said, “but the main thing we got taught was to do the basics right.”

Wales have to pick themselves up for Tuesday’s Nations League game in the Republic of Ireland and that task will not be made any easier by the news that Gareth Bale is highly unlikely to play any part. Bale was reduced to the role of watching from the stands here because of a groin injury and Giggs admitted Wales will almost certainly be without their talisman in Dublin. Ethan Ampadu is also doubtful after picking up a knee injury that forced him off in the second half.

All in all, it was a chastening night for Wales, especially as more than 50,000 people turned up to see them return to the Principality Stadium.

“Disappointing,” Giggs said. “The buildup was magnificent, on the way to the stadium you felt the buzz on the coach, but unfortunately we couldn’t perform on the pitch. Against average teams you have to do the basics right. Against a very good team if you don’t do the basics you get punished and that’s what happened.”

Real Madrid sue over claims club forced Ronaldo to settle in rape case Read more

Giggs was referring specifically to the dismal way Wales defended in the first half. Although Alcácer took his opening goal brilliantly, whipping a rising right-foot shot inside Wayne Hennessey’s near post, the punch that preceded it from the Wales goalkeeper was far from convincing and Giggs’s players were then slow to react.

What followed was even worse, from Wales’s point of view. Suso, who impressed on the Spain right, swung in a free-kick from the left that picked out Ramos, who was totally unmarked. Ashley Williams was the closest player to him but nowhere near close enough and the defender, always a dangerous presence in the opposition area, accepted the invitation to effortlessly head past Hennessey.

When Alcácer volleyed in a third from 12 yards, after Wilson had inadvertently stabbed the ball into his path, Spain were already out of sight and the Wales fans behind that goal could be heard voicing their displeasure that this friendly game had been staged at their former home rather than the Cardiff City Stadium.

At least they had something to celebrate at the end, when Vokes climbed above Bartra to head in Brooks’s centre.