Akapusi Qera's two scores proved vital for Fiji
Japan: (9) 31
Tries: Thompson 2, Soma
Cons: Onishi 2
Pens: Onishi 4
Fiji: (10) 35
Tries: Qera 2, Rabeni, Leawere
Cons: Little 3
Pens: Little 3
Gloucester-bound flanker Akapusi Qera scored two tries as Fiji hung on for a thrilling win over Japan in Toulouse.
Qera's long-range try lit up an error-strewn first half and his second score on 49 minutes put Fiji 17-12 up.
Luke Thompson responded for Japan but a try from Leicester's Seru Rabeni seemed to end the Japanese challenge.
But Tomokazu Soma was bundled over on 62 minutes and although Kele Leawere crossed for Fiji, Thompson's second try set up a grandstand finale.
"We were disappointed but we got the win," said Saracens' Fijian scrum-half Mosese Rauluni.
"We were our own worst enemies. We knew they would play 100 miles an hour. In the first half we were very rusty. We were throwing balls and they didn't stick."
Japan coach John Kirwan said: "Obviously we are disappointed with the result. We've had our chances to win the game.
"I think on the positive note the players played their hearts out and did take one point out of the game."
A weakened Japan had lost 91-3 to Australia at the weekend but former Italy coach Kirwan changed his entire starting line-up for the match in Toulouse.
Fiji, though, had not played in the opening round of games and they started the match brightly, Nicky Little becoming the 12th man to pass 600 points in international rugby union with a fourth-minute penalty.
But as the half continued, Japan started to grow in confidence and they harried the Fijians into a series of handling errors and turnovers.
Inside centre Shotaro Onishi kicked two penalties to give the Japanese a 6-3 advantage but Qera showed great pace to cross from 75 metres out after picking up a loose ball.
Thompson's brace set up a thrilling finish but it was not enough for Japan
Onishi added two penalties either side of the break to make the score 12-10 but Qera claimed his second after supporting a Mosese Rauluni break.
The Stade Municipal crowd were loving the end-to-end rugby, and Thompson continued the scoring after finding a massive gap in the Fijian defence.
Nicky Little's penalty edged Fiji in front and Rabeni's score, after some good work from full-back Kameli Ratuvou and wing Vilimoni Delasau, gave the men in white a six-point cushion.
Japan showed some real grit though and Soma came up with the ball after a rolling maul crashed over the line.
Leawere's pick and drive put Fiji ahead once again but the tenacious Japanese refused to give up and flanker Hare Makiri's fine offload set up Thompson for his second try with just two minutes left.
Japan desperately tried to claim a dramatic match-winning score as the clock ticked down but despite keeping the ball alive well into injury time, Fiji did just enough for the win.
Japan: Aruga; Loamanu, Imamura, Onishi, Endo; Robins, Yoshida; Nishiura, Matsubara, Soma, Ono, Thompson, Makiri, O'Reilly, Miuchi (capt).
Replacements: Inokuchi, Yamamura, Kumagae, Asano, Yatomi, Taira, Onozawa.
Fiji: Ratuvou; Delasau, Rabeni, Bai, Naivua; Little, Rauluni (capt); Dewes, Koto, Qiodravu, Lewere, Lewaravu, Naevo, Qera, Koymaibole.
Replacements: Sauturaga, Railomo, Talei, Ratuva, Dunivucu, Lovobalavu, Ligairi.