Ireland’s World Cup heroics came to an end today in Suwon, as they crashed out after a penalty shoot-out against Spain.
The Spaniards booked a meeting with either co-hosts South Korea or Italy in Gwangju on Saturday for a place in the semi-finals.
With a penalty in the final minute of normal time, Robbie Keane equalised Fernando Morientes' opening goal to send the match into extra time.
But neither side could break the deadlock in the 30 additional minutes so the match went to the first penalty shootout at this World Cup and the first in the tournament since Brazil beat Holland in the 1998 semi-final.
The shootout featured a host of missed kicks.
Matt Holland had blasted his spot-kick over the bar, the ball glancing the woodwork and after Baraja scored, David Connolly hit his kick straight at the Spanish keeper Iker Casillas.
Juanfran missed his chance to win the match when he shot wide, but Kevin Kilbane saw his shot brilliantly saved by Casillas.
Then Juan Carlos Valeron failed to secure the match when he hit the post and when Steve Finnan scored, Mendieta had to find the net to send his country through to the quarter-finals.
He made no mistake and Spain's bid to win the first World Cup in their history is still alive.
Morientes had given Spain the lead after eight minutes at the Suwon World Cup Stadium.
But Ireland missed a first penalty only to be thrown a lifeline with another in the 90th minute when Swedish referee Anders Frisk spotted Spanish captain Fernando Hierro pulling Niall Quinn's shirt to prevent him from jumping for a cross.
Robbie Keane stepped up and slotted the penalty away just minutes before the whistle went for the end of normal time.
Spain's goal came when Morientes pulled away from his marker Gary Breen to head home a cross from the right from Puyol to notch up his 17th goal in 23 appearances for his country.
But the Irish missed a great chance to equalise when Ian Harte's 64th-minute penalty was saved by Casillas.
Damien Duff had earned the spot-kick when he was felled by Juanfran as he tried to cross from the right of the penalty area. Harte placed his penalty towards the centre of the goal and Casillas guessed right, although he pushed the ball away only as far as Kilbane who sliced the rebound wide.
In the first period of extra-time, Ireland had pinned Spain into their own half with Spain a man short because Albelda was injured and coach Jose Antonio Camacho had used all three of his substitutes.
In the second period, Keane drove wide from a Quinn knockdown before Baraja's drive was saved by Given.
The action swung to the other end when David Connolly shot just wide of Casillas' post.
The final minutes of full time had been dramatic as Ireland pushed desperately for an equaliser.
Keane was denied by Casillas with five minutes remaining after the lanky Quinn knocked the ball down just as he did for the decisive goal in the 1-1 draw against Germany.
Duff was outstanding, driving a raking shot just wide of Casillas' right-hand post with ten minutes remaining and running at the Spanish defenders whenever he got the opportunity.
After the match both Niall Quinn and Steve Staunton announced the end of their international careers.