Wales suffered Rugby World Cup heartbreak after captain Sam Warburton was sent off in a controversial and dramatic Rugby World Cup 9-8 semi-final loss to France.
Warren Gatland's men played for over an hour with 14 men after Warburton was dismissed for a dangerous tackle on France wing Vincent Clerc.
But they still came agonisingly close to victory.
Mike Phillips' try brought them back from 9-3 down before Leigh Halfpenny's halfway-line penalty slid just under the crossbar.
Wales threw everything they had at France but they could not create the opportunity for Stephen Jones to attempt a late drop goal.
France were poor but Morgan Parra landed all three of his penalty attempts while James Hook missed two and Jones failed with his conversion attempt.
In the end, Wales' dream of a first World Cup final appearance died with a knock-on and France, who accounted for England last week, will face either New Zealand or Australia in next Sunday's final.
Warburton's dismissal was the talking point of the match and referee Alain Rolland was booed from the stands and widely criticised for his decision.
But the Irish referee applied the letter of the law after Warburton had tipped Clerc in the tackle and 14-man Wales had to battle for 62 minutes as a result.
Wales had also lost tighthead prop Adam Jones to a calf injury after just nine minutes. But battle they did. Wales had the outstanding players on the field in Jamie Roberts, Toby Faletau and Phillips.
France enjoyed a period of pressure early in the second half but Wales soaked it up well and then turned the tables.
The final statistics make for remarkable reading. France, with their full complement of men, were forced to make 126 tackles to Wales' 56.
It was a performance of character, bravery and honour - some of the qualities Gatland has worked to instil in his squad.
Their challenge now is to match Wales' best ever World Cup finish of third place, which they achieved in the inaugural 1987 tournament.
Hook had been given the nod to start after Rhys Priestland was ruled out through injury and he began the game in confident fashion.
The Perpignan-bound fly-half picked out 6ft 4in wing George North with a cross-kick, Faletau drove it forwards and Thierry Dusautoir was spotted creeping offside.
Hook landed the kick from near the left touchline to put Wales ahead but they then suffered the first of two hammer blows when Jones, one of the best props in the competition, limped off after just nine minutes.
Paul James replaced him and immediately the Welsh scrum drew a penalty but Hook slipped as he struck the ball and pulled his kick wide.
Wales were playing with great tempo. Shane Williams' inside pass sent Roberts crashing through the French defence but his offload hit Halfpenny in the face.
Wales had dealt with the loss of Adam Jones - but their promising start was punctured when Warburton was shown red. The decision, however right under the letter of the law, was greeted by boos.
Warburton joined Adam Jones on the bench as the second Welshman to be sent off in a World Cup. The first, with bitter irony, was Huw Richards against the All Blacks in the 1987 semi-final.
France drew level with Parra's penalty before Hook's clearance kick was charged down but Wales were defending heroically and a crunching tackle from North on Maxime Mermoz forced the knock on.
Maxime Medard's ambitious long-range drop-goal attempt fell short and wide but Parra nudged France into the lead after Hook had missed a second penalty.
Wales refused to roll over with Faletau and Dan Lydiate leading the charge but Hook scuffed a drop goal attempt just before the interval.
France looked to up the tempo and Parra, having missed a drop goal shot himself, carved through the Welsh defence but Alun Wyn Jones' tackle on Clerc brought the attack to a shuddering halt.
Stephen Jones was sent on for Hook after 45 minutes as Wales continued to sap up the French pressure and were eventually penalised for dragging down a maul.
Parra extended the lead to 9-3 but Stephen Jones' raking clearance and a strong chase earned Wales a prime attacking platform.
Roberts and then Faletau carried Wales forward before Phillips attacked the blindside, beating both French locks to score and bring Wales storming right back into the game.
Wales dominated the final 10 minutes.
The game was there for them to win as Stephen Jones twice pinned France back in their own 22 with perfectly judged kicks for touch.
Stephen Jones fluffed one drop-goal shot off his left foot but after Roberts and Faletau had driven forward he turned down the opportunity of another.
Stephen Jones stood flat and tried to carry it only to spill the ball in the tackle.
Still Wales had chances. Nicolas Mas was penalised on halfway for hitting a ruck from the side but Halfpenny's long-range strike slid agonisingly under the posts.
Wales had one last chance.
They attacked through over 25 phases in a bid to create platform for Stephen Jones to try a drop goal but the French defence held firm on their own 10 metre line, eventually drawing the knock-on that ended dashed Welsh dreams.