France survived a stirring fightback by Japan before three late tries gave them a flattering win in their opening World Cup match.
Early tries from Julien Pierre and Francois Trinh-Duc and two Dimitri Yachvili penalties put the French 20-3 up at North Harbour Stadium.
But Japan fly-half James Arlidge scored two tries either side of half-time to bring them to within four points.
Yachvili's relieving penalty preceded three tries in the last 10 minutes.
Locks Lionel Nallet and Pascal Pape both crossed before scrum-half Morgan Parra - who ended up at fly-half after a "potentially serious" injury (according to coach Marc Lievremont) to another replacement, David Skrela - sprinted clear in the final minute.
But that put a flattering gloss on the scoreline for the French, who for 20 minutes in the second half looked as if they could be on the verge of the tournament's greatest upset.
There was no hint of the drama to come when burly lock Pierre ploughed over after four minutes and Trinh-Duc intercepted an Arlidge pass to sprint home.
Yachvili added a couple of penalties before the half-hour, before Arlidge enjoyed a slice of luck, his attempted grubber bouncing back off Trinh-Duc into his hands, to make it 20-8.
Wing Vincent Clerc finished off a clinical move for a third French try, Arlidge keeping Japan in touch at half-time with a penalty to make it 25-11.
But after France had two further tries ruled out on the resumption, Imanol Harinordoquy and Lionel Nallet both unable to ground the ball after getting over the line, the favourites floundered.
Centre Fabrice Estebanez limped off injured with a back problem and Japan, who have only ever won one World Cup match, 20 years ago against Zimbabwe, seized their moment.
New Zealand-born Arlidge, who plays for Nottingham in the second tier of English rugby, brushed off two weak French tackles and converted his own try to make it 25-18.
He then landed a penalty to give France palpitations, before the admirable Yachvili and replacement Parra steered them home.
"I am not happy with the result, however it wasn't a surprise, more a disappointment," said Lievremont, who admitted his players were complacent. "Maybe they thought it was going to be an easy evening especially after the first two tries, and we had three or four good opportunities so I think everybody thought it was going to be easy.
"But it didn't happen like that. This is a World Cup match and they have to do better."
France: Cedric Heymans, Vincent Clerc, Aurelien Rougerie, Fabrice Estebanez, Maxime Medard, Francois Trinh-Duc, Dimitri Yachvili; Fabien Barcella, William Servat, Nicolas Mas, Julien Pierre, Lionel Nallet, Thierry Dusautoir, Imanol Harinordoquy, Raphael Lakafia. Replacements: Jean-Baptiste Poux (for Barcella, 50), Dimitri Szarzewski (for Servat, 50), Pascal Pape (for Nallet, 70), Julien Bonnaire, Morgan Parra (for Skrela, 61), David Skrela (for Trinh-Duc, 50), David Marty (for Estebanez, 46).
Japan: Shaun Webb, Kosuke Endo, Koji Taira, Ryan Nicholas, Hirotoki Onozawa, James Arlidge, Fumiaki Tanaka; Hisateru Hirashima, Shota Horie, Kensuke Hatakeyama, Luke Thompson, Toshizumi Kitagawa, Takashi Kikutani (captain), Michael Leitch, Ryukoliniasi Holani. Replacements: Yusuke Aoki, Nozomu Fujita (on for Hatakeyama, 42), Hitoshi Ono, Itaru Taniguchi (for Holani, 35), Atsushi Hiwasa (for Tanaka, 66), Murray Williams (for Webb, 66), Alisi Tupuailai (for Taira, 54).