|South Africa (12) 32|
|Tries: Louw, Du Plessis, De Jager, Strauss Cons: Lambie 2, Pollard Pens: Lambie, Pollard|
|Japan (10) 34|
|Tries: Leitch, Goromaru, Hesketh Cons: Goromaru 2 Pens: Goromaru 5|
Japan stunned two-time champions South Africa to cause arguably the biggest upset in rugby union history.
Karne Hesketh crossed in the final minute to win an incredible World Cup Pool B encounter in Brighton.
South Africa led 12-10 after Francois Louw and Bismark du Plessis tries.
Lood de Jager and Adriaan Strauss also scored for the Springboks, but Ayumu Goromaru contributed 24 points, including a try, before Hesketh's dramatic clincher.
|More from rugby:|
|Watch: The Hit - Japan shock the world|
|Japan's 'miracle' lights up World Cup|
|How the world reacted to Japan's stunning victory|
|Get World Cup alerts direct to your phone|
|Rugby World Cup 2015 group-by-group schedule|
|For the latest rugby union news, follow @bbcrugbyunion on Twitter|
Japan had not won a World Cup game since 1991, while South Africa were world champions in both 1995 and 2007.
Brave Blossoms play with pace
Japan started the game brightly, played with quick ball and took the game to South Africa, never looking overawed by their powerful opponents.
Captain Michael Leitch went over for Japan's first try as they went 10-7 up after 29 minutes and, although Du Plessis quickly responded, the Brave Blossoms stayed in touch throughout the second half.
Coached by former Australia boss Eddie Jones, who was also part of the Springboks staff during their 2007 triumph, Japan were committed in the tackle and always looking to attack, with scrum-half Fumiaki Tanaka dictating the tempo of their game and full-back Goromaru putting in a near-flawless kicking display.
The 29-year-old added to his points tally when he finished off a well-worked move and, after he converted his own try, the score was 29-29 with just over 10 minutes remaining.
Replacement Handre Pollard kicked South Africa back in front eight minutes from the end after Japan strayed offside but the underdogs were not to be denied.
They laid siege to the Springboks' line as time ticked beyond 80 minutes, twice opting not to kick penalties that would have earned them a draw. Their adventure was rewarded as they span the ball across the field for Hesketh's winning try on the left flank.
Japan fed off the energy of the crowd at the Brighton Community Stadium and, after their lap of honour, the whole squad bowed in front of the main stand to recognise the support within the ground.
Springboks below their best
The Springboks had named their most experienced Test side in history, with 851 caps in the starting XV, but they were below par in a number of areas.
Their kicking game was found wanting in the first half, their pack was unconvincing despite a weight advantage and indiscipline cost them in the second half.
Several kickable penalties were given away after the break to allow Goromaru to keep Japan in touch, while Coenraad Oosthuizen's late yellow card proved costly as Japan were able to stretch the play for Hesketh to touch down in the corner.
What they said
Japan coach Eddie Jones: "It's quite incredible. We thought we could compete but to beat South Africa is a fantastic achievement for the team and it's a great day for Japanese rugby.
"Japan can only play one way, we've got a little team, so we have to move the ball around and cause problems.
"Today is just the start. The target now is to make the quarter-finals and we have got Scotland in four days' time so we cannot rest on our laurels.
"If you are a child in Japan you will watch this and you will want to play rugby for Japan [who are hosting the tournament in 2019] in the next World Cup."
South Africa coach Heyneke Meyer: "I have to apologise to the nation. It was just not good enough. It was unacceptable and I take full responsibility.
"Every game is going to be tough but there are no excuses. We scored four tries but our discipline was not good enough and we can't give so many penalties away.
"I said before, this will be the toughest World Cup ever and I think there will be more shocks. I still believe we can win the World Cup, but I have to press some hard buttons to try to fix it."
South Africa enjoyed more possession and territory but, in the limited time Japan entered their half with the ball, the Boks infringed the breakdown and were punished with the penalties that ultimately lost them the game.
South Africa: Kirchner; Habana, Kriel, de Villiers, Mvovo; Lambie, Pienaar; Mtawarira, B du Plessis, J du Plessis, De Jager, Matfield, Louw, du Toit, Burger.
Replacements: Pietersen for Mvovo (71), Pollard for Lambie (58), du Preez for Pienaar (58), Nyakane for Mtawarira (55), Strauss for B du Plessis (54), Etzebeth for De Jager (69), Kolisi for du Toit (58) Oosthuizen for J du Plessis (58).
Sin bin: Oosthuizen (80).
Japan: Goromaru; Yamada, Sau, Tatekawa, Matsushima; K Ono, Tanaka; Mikami, Horie, Hatakeyama, Thompson, H Ono, Leitch, Broadhurst, Tui.
Replacements: Hesketh for Matsushima (80), Tamura for K Ono (75), Hiwasa for Tanaka (68), Inagaki for Mikami (59), Kizu for Hatakeyama (54), Makabe for H Ono (57), Mafi for Tui (47).
Not Used: Yamashita.
Ref: Jerome Garces (France).