The Barbarians conjured a superb last-minute try to condemn a youthful England side to defeat in a non-cap international at Twickenham.
Tries from Henry Trinder, Ugo Monye and James Simpson-Daniel helped the hosts into a 24-7 lead after 26 minutes.
But the Baa-Baas hit back with four unanswered tries to lead 31-24 before England responded with a penalty from Charlie Hodgson and a Tom Johnson try.
But Baa-Baas wing Tim Visser finished off a flowing move to win it late on.
It was a second try for the Edinburgh-based Dutchman, as the invitational side out-scored England six-to-four on the try count.
The hosts also had to contend with worrying-looking injuries to Harlequins duo Ugo Monye and Joe Marler.
Monye, a contender for the final wing spot in England's World Cup squad, limped off with damaged knee ligments while 20-year-old prop Marler was carried off on a stretcher with mild concussion. Matt Banahan also suffered a soft tissue injury.
Of the players hoping to boost their prospects of getting on the plane to New Zealand, captain Luke Narraway probably advanced his cause the most, while Banahan confirmed his versatility with a powerful display and fly-half Charlie Hodgson showed touches of class.
Hodgson's array of passing was in evidence from the off as he created the opening try inside three minutes.
Twice sending Banahan - playing at inside centre - on short bursts up the middle, the Saracens-bound number 10 then checked his pass superbly to put Narraway in space, who in turn sent Trinder over.
If the young Gloucester centre, one of five players making their senior debuts, enjoyed his start to life at international level, he was swiftly exposed to its harsher realities.
Paul Sackey, England's top try-scorer at the last World Cup, left him clutching at thin air as hared round him in the lead-up to the Barbarians' first try.
Prop Marler, another debutant, drifted to the right in the defensive line and Frederic Michalak seized the opportunity, delaying his short pass perfectly to fellow Frenchman Benoit Baby, who danced through the gap and sprinted to the line.
Michalak's conversion levelled matters at 7-7 before England reasserted themselves.
The giant Banahan ploughed straight through Michalak and Exeter flanker Johnson - another debutant - just failed to ground a bouncing ball in the left corner.
A strong drive from Marler, bouncing off Springboks flanker Joe van Niekerk, earned England a penalty that Hodgson - to the sound of mild booing from the crowd - kicked to nudge the hosts 10-7 ahead.
Their second try arrived in the 19th minute as Banahan sucked in the Baa-Baas midfield on a dummy run, Hodgson released Simpson-Daniel and he and Mike Brown put Monye into space.
The Harlequins wing chipped inside and when Nicolas Jeanjean failed to secure the ball, Monye stooped over the full-back and dabbed the ball down, Hodgson adding a second conversion for a 17-7 lead.
Simpson-Daniel then profited from Narraway's good work in collecting a Michalak kick and leaving his opposite number Sergio Parisse for dead with a dummy before feeding his Gloucester team-mate.
Simpson-Daniel, who made his reputation when he embarrassed the great Jonah Lomu in the same fixture nine years ago, stepped inside Ruan Pienaar to finish in dazzling style.
That proved to be the high-point of England's afternoon, as the Barbarians got on top in the scrum and started to dominate at the breakdown.
The hosts lost Bath-bound flanker Carl Fearns to the sin-bin for killing the ball at a ruck six minutes before half-time and the Barbarians should have immediately capitalised.
With a man advantage at the scrum, they worked a perfect opening only for Van Niekerk to waste the scoring chance with a forward pass to Sackey, released by Toulon and sporting the pink socks of Stade Francais, a sign perhaps of where he will be playing next season.
But after a break-out from Brown, Paul Hodgson's pass was intercepted by Michalak, who raced away to score, the maverick Frenchman adding the conversion for good measure.
That brought the Barbarians to within 10 points at the interval, and they halved that deficit nine minutes into the second period.
For all the positives from Simpson-Daniel in attack, the watching Martin Johnson would not have been too impressed with the way the wing allowed his opposite number Visser to collect Michalak's cross-kick, step past him and race away up the left touchline to score.
Michalak missed the conversion to leave it at 24-19, and did so again when the Baa-Baas drew level in the 57th minute, replacement Joe Tekori showing soft hands to put George Smith over in the right corner.
But the momentum was with the invitational side, and Van Niekerk swiftly plundered a fifth try from close range, Michalak converting for a 31-24 lead.
England took stock while Marler, after a lengthy spell of on-pitch treatment, was carried off.
Hodgson kicked a penalty - to more boos - to reduce the deficit to four points, and reinforced with several replacements, they regained the lead with eight minutes left, Johnson capping his debut with a dummy before accelerating over.
But the Barbarians, who introduced rugby league convert Willie Mason for his union debut for the last 15 minutes, had the last word with a try befitting their tradition.
Fijian Tekori outstripped the England midfield before releasing the charging Van Niekerk.
The powerful South African was stopped just short, but still conjured an off-load off the floor for Visser to finish, Pienaar converting with the last kick of the match.
England: Brown (Harlequins), Simpson-Daniel (Gloucester), Trinder (Gloucester), Banahan (Bath), U Monye (Harlequins), Hodgson (Sale), Hodgson (London Irish); Marler (Harlequins), Paice (London Irish), Doran-Jones (Gloucester), Kitchener (Worcester), Attwood (Gloucester), Johnson (Exeter), Fearns (Sale), Narraway (Gloucester, capt)
Replacements: Brookes (Newcastle, for Doran-Jones, 58, Doran-Jones for Marler, 62), Gaskell (Sale, for Fearns, 52), Gibson (London Irish, for Kitchener, 58), Young (Newcastle, for P Hodgson, 58), Myler (Northampton, for Brown, 66), Turner-Hall (Harlequins, for Monye 43). Not used: Gray (Harlequins)
Sin Bin: Fearns (35).
Barbarians: Jeanjean (Brive); Sackey (Toulon), Baby (Clermont Auvergne), Bastareaud (Stade Francais), Visser (Edinburgh); Michalak (Toulouse), Pienaar (Ulster); Perugini (Aironi), Ghiraldini (Benetton Treviso), Kubriashvili (Toulon), Lund (Biarritz), Geldenhuys (Aironi), Van Niekerk (Toulon), Smith (Toulon), Parisse (Stade Francais, capt).
Replacements: Bruno (Toulon, for Ghiraldini, 50), Hayman (Toulon, for Kubriashvili, 50), Tekori (Castres, for Geldenhuys, 55), Williams (Cardiff Blues, for Smith, 65), Mason (Toulon, for Sackey, 65), Rabini (La Rochelle, for Baby, 50). Not used: Tillous-Borde (Castres).
Referee: Christophe Berdos (France)