Conor Hourihane gave the Republic of Ireland Under-17s the lead in their final UEFA Championship game in Antalya, Turkey but holders Spain fought back to score three times in the second half.
Spain and France progress from Group B into the Championship semi-finals.
Two defeats against France and Switzerland in their opening two matches meant Ireland couldn't qualify from the group into the semi-finals but they were full value for their interval lead against the holders.
Ireland broke the deadlock after a quarter of an hour with a move which began from Gavin Gunning’s throw-in on the left side. Conor Clifford received the throw, swept past his marker and threaded a ball into the box where Sunderland midfielder Hourihane took one touch before drilling low into the bottom right corner.
Spain threatened in the first half, mainly down the flanks, and their made Ireland goalkeeper Ger Hanley work when Carmona outpaced Pauric Ormsby and fired in a shot within a minute of going behind.
Martin tried his luck with a shot from the edge of the box on 32 minutes which Hanley again managed to hold onto.
Spain drew level seven minutes after half-time through a flowing passage of play. Carmona delivered a long pass out of defence to the onrushing Keko on the right wing who invited the challenge of Gunning before laying the ball back for Ruben Rochina, one of two interval substitutes, to curl home a first-time drive past Hanley.
Rochina then put Spain into the lead on 55 minutes with a terrific free-kick (left) after Gunning committed a foul on the edge of the box.
McCaffrey introduced Robert Brady two minutes later and he was the source of a great Irish chance on 59 minutes. The Manchester United winger picked out Hourihane at the back post from a corner kick and his thunderous volley smacked off the crossbar.
Keko made it 3-1 on 72 minutes after he broke into the penalty area, latched onto the loose ball and tucked a low shot into the net.
Brady had a sight of goal four minutes from the end when Spanish goalkeeper Angel Diaz failed to deal with a cross from the right. Brady took aim as the ball landed at his feet but two defenders closed and his effort from just inside of the box sailed over the bar.
France beat Switzerland 2-0 in the other Group B game being played simultaneously. Spain finish top of the group and will be joined in the semi-finals by the French.
Ireland vice-captain Johnny Dunleavy overcame a hip injury to play his only part in the tournament. Paul Murphy was the other change, brought in for the injured Gearoid Morrissey and the Ipswich Town youngster was lively in attack.
Sean McCaffrey’s side were looking to complete their series on a high. France inflicted a defeat on the Irish last Sunday through a late winner and an unfortunate own-goal from Gavin Gunning was the difference between the Irish and Switzerland in their second game on Wednesday.
REPUBLIC OF IRELAND: Ger Hanley (Salthill Devon), Padraic Ormsby (Crumlin United), John Dunleavy (Wolves), Mark Connolly (Wolverhampton Wanderers), Gavin Gunning (Blackburn Rovers), Conor Clifford (Chelsea), Aaron Doran (Blackburn Rovers), Richie Towell (Celtic), Conor Hourihane (Sunderland), Greg Cunningham (Manchester City), Paul Murphy (Ipswich Town).
Substitutions: Robert Brady (Manchester United) for Gunning (57 mins) and Danny Joyce (Belvedere) for Cunningham (78 mins),
Subs not used: Gearoid Morrisey (Ringmahon Rangers), Darragh Satelle (Hull City), John Sullivan (Crumlin United), Gavin Carlin (West Bromwich Albion), Shaun Timmons (Birmingham City)
SPAIN: Angel Diaz, Martin Montoya, Angel Martinez, Ion Gaztanaga, Alvaro Lopez, Sergio Gontan, Thiago Alcantara, Jorge Pulido, Sergio Garcia, Oscar Sielva, Adria Carmona.
Substitutions: Ruben Rochina for Sergi and Sergio Canales for Garcia (both half-time), Manuel Gavilan for Thiago (61 mins).
Subs not used: Oriol Romeu, Manuel Gavilan, Alejandro Sanchez, Geraldo Bruna, Carles Planas
REFEREE: Tero Nieminen (Finland).
UEFA U17 CHAMPIONSHIP FINALS GROUP B RESULTS:
4 May 2008
France 2 - 1 Republic of Ireland
Spain 2 - 1 Switzerland
7 May 2008
Republic of Ireland 0-1 Switzerland
Spain 3-3 France
10 May 2008
Republic of Ireland 1-3 Spain
Switzerland 0-2 France.
UEFA European Under-17 Championship holders Spain are through to the semi-finals as Group B winners after Rubén's half-time introduction turned the tables on the Republic of Ireland in Antalya.
Already confirmed as finishing fourth at kick-off after two defeats, Ireland were playing for pride and took an early lead through Conor Hourihane. But Rubén, filling the No9 shirt worn last year by FC Barcelona colleague Bojan Krkić, turned the game with two superb strikes and provided Keko with the clincher which ensured Spain finished above France on goal difference and set up a Tuesday semi-final with the Netherlands.
Ireland's team, which included previously injured John Dunleavy in defence, nearly gave their loyal band of supporters something to cheer on three minutes. Aaron Doran broke through but was denied by Spain goalkeeper Angel Díez, given a first finals start ahead of Álex.
Angel Díez was beaten on the quarter-hour. Conor Clifford picked up the ball after Gavin Gunning's throw-in on the left and slid through a perfect diagonal pass that Hourihane finished with aplomb. However, falling behind was the cue for Spain to take control of the match but Ireland were holding firm, Gerard anley diving to save after Martín burst through, and again from Keko's strong shot.
Rubén, on a booking, had been rested up front in favour of the two-goal Matchday 1 hero against Switzerland, Sergi, but the two were swapped at the break and the substitute swiftly came close with a free-kick. In the end seven minutes was all Rubén needed to open his tournament account, Keko jinking in the area and passing for the striker to beat Hanley with a left-footed shot.
Hanley stopped another Rubén effort but his second goal soon followed, a low-curling free-kick from the edge of the area worthy of any level of football. Ireland refused to be beaten and Hourihane smashed a drive on to the underside of the crossbar. The ball also fell nicely to substitute Robert Brady who shot over, but Spain had the last word, Rubén returning the favour for the first goal by setting up Keko to produce a neat finish, ensuring Spain avoid facing hosts Turkey in the last four.