Mike Phillips was Bayonne's Amlin Challenge Cup hero as he grabbed the match-winning try in the dying moments of their Pool 3 clash with Newport Gwent Dragons.
The Wales scrum-half darted over with just four minutes left at the Stade Jean Dauger as Bayonne battled back from a 19-6 deficit after 52 minutes.
Tries from replacement hooker David Roumieu and full back Sam Gerber after 54 and 64 minutes respectively had Bayonne back within a point at 19-18 but Tom Prydie looked to have won it for the Dragons with a 68th-minute penalty.
Prydie kicked 17 points on the night as he slotted five penalties and a conversion to see the Dragons go close to recording the result that would have kept their own Amlin Challenge Cup hopes alive for a day-and-a-half at least.
A 21st-minute try from openside flanker Lewis Evans had contributed to a 16-6 lead for the visitors but they couldn't hang on as Bayonne backed up their 22-19 success at Rodney Parade in Round 2.
Bayonne's other points came from penalty goals from fly-half Jacques Louis Potgieter in the first and 20th minutes and from his successful conversion of Roumieu's try, with Matthieu Ugalde adding the extras to fellow replacement Phillips' final score.
The result means Bayonne still harbour hopes of a place in the last eight for the first time since 2006, although former tournament winners London Wasps could extinguish that dream with a bonus-point win over Italian outfit Rugby Mogliano at Adams Park on Saturday afternoon.