Fiji held off a late comeback from the Barbarians to claim an entertaining win at Twickenham.
Mathieu Bastareaud and Andre Esterhuizen crossed for the Baa-Baas in the first half, but converted tries from Enele Malele and Teti Tela saw Fiji lead at the break.
John Dyer’s two second-half scores and Temo Mayanavanua’s try kept Fiji ahead.
The Baa-Baas drew close through late efforts from Makazole Mapimpi and Morne Steyn, but Fiji clung on.
England coach Eddie Jones was in charge of the Barbarians, who featured former Ireland hooker Rory Best in his final game before retirement.
Three missed conversions from Barbarians fly-half Curwin Bosch proved crucial to the final result, as did two close try decisions that went against his side in the second half.
World Cup winner Tendai Mtawarira thought he had crossed in his final international appearance, but the the 34-year-old prop, nicknamed ‘Beast’, had his close-range effort disallowed after replays showed that he had dropped the ball when crossing the line.
And the Baa-Baas came close again when Esterhuizen was shown to be just short of the line after stretching for what would have been the South African centre’s second try.
Fiji’s World Cup hopes had been dented when two missed kicks from Josh Matavesi proved crucial in their 30-27 defeat by Uruguay, but Tela’s four successful conversions at Twickenham were vital in the final analysis.
The Fijians frequently attacked from deep and looked to be set for a comfortable win when a second try from impressive flanker Dyer saw them to a 33-17 lead.
Best and Mtawarira had enjoyed standing ovations when being substituted, but the late appearance of former Springbok fly-half Steyn ensured a rousing finish.
The 35-year-old ran in a brilliant try with two minutes to go, shortly after Mapimpi’s second, and then kicked the conversion himself but Fiji stood firm.
Barbarians: Havili, Leyds, Bastareaud, Esterhuizen, Mapimpi, Bosch, Powell; Mtawarira, Best, Pieretto, Jones, Ardron, Samu, van Staden, Strauss.
Replacements: Makalio, Maafu, van Wyk, Cottrell, Philip, Vermaak, Am, Steyn.
Fiji: Malele, Wainiqolo, Tikoirotuma, Vularika, Osborne, Tela, Lomani; S. Tawake, Veramalua Vugakoto, Mawi, Mayanavanuav, Nabou, Voka, Dyer, Radrodo.
Replacements: Ikanivere, Veitayaki, Ducivaki, Naqali, Kunavula, P. Matawalu, Muntz, Reece.