Wales scrum-half Mike Phillips broke Dragons hearts as he burst over for a late try to clinch a dramatic win for Bayonne in the Amlin Cup.
The Welsh region had led with four minutes left thanks to a try by captain Lewis Evans and five penalties and a conversion by Tom Prydie.
But Phillips' quick tap penalty, added to earlier tries by David Roumieu and Sam Gerber gave Bayonne the lead.
The Dragons attacked until the final whistle, but were held out.
The Dragons were in control up until the hour mark when they took a 13 point lead, but the introduction of giant prop Nemiah Tialata and Phillips midway through the second half turned the tables.
Bayonne fly half Jacques-Louis Potgieter gave the home team a first minute lead when he slotted a straight-forward penalty, but Tom Prydie levelled after 10 minutes, and there were another 11 uneventful minutes before the next score.
Again it was Potgieter who was on target with a simple penalty.
But the Dragons took a shock lead from the restart. Left wing Michael Poole charged down Potgieter's clearance and flanker Lewis Evans gathered the loose ball and charged over for a gift try, which Prydie converted.
There was more trouble for the French side as superb interplay by the Dragons freed scrum half Jonathan Evans who was brought down illegally by fullback Sam Gerber.
Prydie kicked the resulting penalty and Gerber was sent to the sin-bin by referee Andrew Small.
Potgieter hit the post with a simple penalty, but Prydie made no mistake from 35 metres to give the Dragons a 10 point cushion five minutes before the interval.
And with their experimental back row leading the way in defence, the Welsh team were not troubled further before half time.
Bayonne employed high risk tactics at the start of the second half, using quick throw-ins and running from deep in their own half.
And the Dragons should have punished them in the 49th minute when Will Harries probed down the left and Bayonne were forced to kill the ball at a ruck. But Prydie put his penalty attempt the wrong side of the post.
It was a brief reprieve however, as another over-complicated move came to grief and this time Prydie made no mistake to extend the lead to 13 points.
The entry of Nemiah Tialata shored up Bayonne's creaking scrum, and he won a penalty which led to the home team kicking for the corner and driving over for a try from the lineout, with David Roumieu claiming the touchdown.
Potgieter converted to bring Bayonne back to within six points.
The French team's high-tempo style finally began to stretch the Dragons, who were also struggling to hold the scrum at bay with Tialata causing chaos.
The Dragons repelled wave after wave of close-range attacks by the French, but a long, looping pass finally freed Gerber to squeeze over in the left corner.
Prydie gave the Welsh team a lifeline when he slotted a penalty from close range to make it 22-18 with 11 minutes remaining.
But it was another Welshman, Bayonne's Mike Phillips, who had the final say.
His quickly taken penalty caught the Dragons napping, and he powered through Lewis Evans; tired tackle in the right corner for the decisive try.
Bayonne: Sam Gerber; Gabriele Lovobalavu, Thibault Lacroix, Lionel Mazars (capt), Bastien Fuster; Jacques-Louis Potgieter, Guillaume Rouet; Pierre-Philippe Lafond, Anthony Etrillard, Renaud Boyoud, Rob Linde, Matt Graham, Abdellatif Boutaty, Jean Jo Marmouyet, Marc Baget-Rabarou.
Replacements: David Roumieu, Nemiah Tialata, Marc Legras, Dewald Senekal, Julien Puricelli, Mike Phillips, Manu Ahotaeiloa, Matthieu Ugalde.
Newport Gwent Dragons: Tom Prydie; Will Harries, Adam Hughes, Andy Tuilagi, Mike Poole; Steffan Jones, Jonathan Evans; Owen Evans, Hugh Gustafson, Nathan Buck, Adam Jones, Rob Sidoli, Jevon Groves, Lewis Evans (capt), Ieuan Jones.
Replacements: Sam Parry, Nathan Williams, Tim Ryan, Andrew Coombs, Toby Faletau, Wayne Evans, Ashley Smith, Jack Dixon.
Referee: Andrew Small (England)
Assistant Referee: Martin Fox (England)
Assistant Referee: Stuart Terheege (England)
Fourth Official: David Rosich (France)
TMO: Graham Hughes (England)
Citing Commissioner: John West (Ireland)