Damien Traille's three drop-goals proved crucial to victory
Takudzwa Ngwenya starred in a Heineken Cup quarter-final of dazzling attacking prowess as Biarritz controversially edged out the Ospreys in San Sebastian.
The wing scorched Shane Williams for a superb 70m first-half try, before Ryan Jones and Lee Byrne struck back.
A stronger Biarritz set-piece helped Ngwenya set up an Iain Balshaw try and Damien Traille land three drop-goals.
Nikki Walker's try set up a late surge, Dan Biggar missing a last-second drop goal as the Ospreys demanded a penalty.
The visitors felt that Dimitri Yachvili had surged offside from the final ruck and deliberately knocked on, but referee George Clancy ruled he had come from behind the final foot and accidentally bumped the ball forward.
The Basque side will now have home-country advantage in their semi-final against Munster.
That will be the fourth semi-final for 2006 runners-up Biarritz, while the Ospreys - who have only made the knock-out stages three times - crash at the quarter-final stage for the third successive season.
The game had sizzled from start to finish in the fierce heat at the Estadio Anoeta, the French side having taken the game across the Spanish border to ensure a larger crowd.
Biarritz reclaimed their own kick-off and surged forward under the urging of a fervent 32,000 spectators, Yachvili sending the ball back to Traille who calmly slotted a first-minute drop-goal.
The Ospreys were not to be overawed as in their previous two Heineken Cup quarter-finals, though, Byrne splitting the line before choosing a misjudged kick rather than his supporting runners.
A Balshaw blunder in midfield gave Andrew Bishop the chance to hare for the line, but again the off-load was ignored and the visitors knocked on from the ruck.
There was more composure from James Hook, who made a scintillating break from his own half and found the supporting Bishop.
As the Ospreys went for the kill, US international Ngwenya knocked on a potentially try-scoring pass on the 22, a move that looked deliberate and could have resulted in a yellow card.
But referee Clancy decided that it was a legitimate attempt at a one-handed interception and awarded the Ospreys a scrum.
Takudzwa Ngwenya leaves Shane Williams trailing for a stunning try
To rub salt into the wound, when Biarritz reclaimed the ball near their own line Traille immediately fired the ball out wide to Ngwenya.
The Eagles star - arguably the fastest man in world rugby - pinned back his ears to leave Mike Phillips clutching air, before targeting last-man Williams.
The Welsh star showed Ngwenya the outside - and he took it with interest, brushing off Williams and sizzling home for a stunning 70-yard score, improved from the sideline by Yachvili.
Williams made amends with a trademark step and line-cut in midfield, then an off-load to Hook.
The centre passed inside to Jones, who dummied rather than sending Jerry Collins under the posts but had the pace to make it to the line for a converted score.
Yachvili gave the home side breathing space with a penalty, before Traille added his second drop-goal following the third lost line-out on the Ospreys' throw.
The Basque pack was starting to rumble in the mauls and their scrum power won them a penalty that Yachvili sent just wide.
Biggar was inches short with a 48m kick, then from the Biarritz clearance the Ospreys' attacking potential fired with a score of the highest quality.
Hook again made the initial break near halfway, the Welsh side attacking down the left, before switching across field with some flawless passing.
Lee Byrne crosses for the Ospreys' second scintillating try
The outstanding Marty Holah was on hand to deliver the scoring pass for Byrne to dive over in the corner, Biggar missing the conversion.
A Holah tackle gave the Ospreys one more chance before the break, Biggar showing the composure to sneak over a drop-goal that cut the deficit to one point at half-time.
The Ospreys fly-half then gave his side the lead for the first time with a nerveless penalty at the start of the second period, but his senseless off-the-ball tackle on Ngwenya saw Yachvili cancel that out.
Biarritz had profited from poor Ospreys restarts all day, and they drove home the advantage from another with a powerful scrum.
Yachvili quickly fired the ball to Ngwenya who roared forward and chipped over the cover, Balshaw first to gather the kick for a converted try.
Balshaw went off, injured in the act of scoring, and Biggar clawed back three points with a penalty.
Tommy Bowe threatened with a dazzling break-out from his own 22, before the general Traille stood out from the chaos with his third drop-goal.
Biggar narrowly missed with a penalty and a drop-goal, and the Ospreys' hopes seemed to have gone.
With five minutes to go, though, Phillips scythed through the midfield defence to give replacement Walker a clear run under the posts, Biggar's conversion cutting the gap to a point.
Biarritz tried to run down the clock but conceded a penalty, allowing the Ospreys to kick to just outside their 22 with a minute to go.
The visitors won the ball and gathered themselves at a midfield ruck.
Yachvili timed his spoiling run to perfection, but knocked on the ball that was intended for Biggar.
Ospreys regathered, but they had lost crucial yards and when the slow ball came back to Biggar his weak drop-goal drifted wide.
Biarritz joint coach Jack Isaak: "We knew the match would hinge on the tightest of margins.
"However, I think we deserved to win the match. We are above all delighted with the result.
"We made a lot of errors, and allowed them back into the match."
Ospreys captain Ryan Jones: "We had plenty of other opportunities to have won the game comfortably. We don't come to arenas like this and get intimidated, we come to be brave and to play.
"I'm heartbroken for my team. We possibly deserved to get more. It was two teams going at it hammer and tong.
"I'm always proud of my team and they have played with a lot of heart and courage - but sometimes you need a little bit more than that.
"There is still some rugby left this season but our Heineken Cup dream is over."
Biarritz: Balshaw, Ngwenya, Hunt, Traille, Bolakoro, Peyrelongue, Yachvili, Coetzee, August, Johnstone, Thion, Carizza, Lauret, Harinordoquy, Faure. Replacements: Mignardi for Balshaw (53), Gobelet for Bolakoro (64), Barcella for Coetzee (50), Terrain for August (70), Hall for Carizza (41), Alexandre for Lauret (63). Not Used: Hughes, Courrent.
Ospreys: Byrne, Bowe, Bishop, Hook, Williams, Biggar, M. Phillips, James, Bennett, A. Jones, A. Jones, J. Thomas, Collins, Holah, R. Jones. Replacements: Walker for Bishop (63), Shervington for Bennett (76), Gough for A. Jones (63), Tiatia for Holah (69). Not Used: Bevington, Mitchell, Nutbrown, Parker.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.