Wales face two-time champions South Africa for a place in the World Cup final on Sunday.
Victory over France in Oita last weekend earned Wales their place in the last four, while the Springboks got the better of hosts Japan.
Here, the PA news agency takes a look at each team's progress through the tournament.
Wales
Pool D: Wales 43 Georgia 14
Wales had a bonus point wrapped up by half-time after tries from Jonathan Davies, Justin Tipuric, Josh Adams and Liam Williams. Although the second period proved a much tighter affair, Wales were never threatened, and Tomos Williams and George North went over after the break to ensure a comfortable victory.
Key stat: North scored his first World Cup try in eight years and his fourth in total. His last came against Fiji in October 2011.
Pool D: Wales 29 Australia 25
Wales put one foot in the quarter-finals by beating their main rivals for top spot in Pool D. Gatland's men looked home and dry when they led 26-8 through tries by centre Hadleigh Parkes and scrum-half Gareth Davies. Australia battled back to reduce the deficit to one point at 26-25, but Wales held out for a huge result.
Key stat: Alun Wyn Jones won his 130th cap to become Wales' most-capped player.
Pool D: Wales 29 Fiji 17
Wales survived a major fright to subdue flamboyant Fiji and book their place in the quarter-finals. Warren Gatland's team recovered from conceding two tries in the opening 10 minutes, with wing Josh Adams touching down twice before half-time and then completing a hat-trick in the second half.
Key stat: Adams' hat-trick followed the one scored by Cory Allen against Uruguay in the 2015 tournament.
Pool D: Wales 35 Uruguay 13
Much-changed Wales ended the pool stage with an unconvincing win against Uruguay. Wales led by only a point at half-time and left it late to pull clear of the Pacific Islanders, with Tomos Williams and Gareth Davies both touching down in the closing stages.
Key stat: Wales won all of their matches in the pool stage for the first time since 1987.
Quarter-final: Wales 20 France 19
Ross Moriarty's 74th-minute try – converted by Dan Biggar – rescued victory for Wales in a match in which France had them on the ropes after a strong start. The game turned on a red card for French lock Sebastien Vahaamahina, who was sent off in the 48th minute for elbowing Wales flanker Aaron Wainwright – scorer of his side's opening try – in the face.
Key stat: This was Wales' biggest comeback in a World Cup match, having trailed by 12 points at one stage.
South Africa
Pool B: South Africa 13 New Zealand 23
The Springboks opened with a clash between two titans of world rugby, which could yet be repeated in the final. The match never quite lived up to the hype and two tries in three first-half minutes from George Bridge and Scott Barrett gave the All Blacks a platform upon which to build a victory that got South Africa's campaign off to a disappointing start.
Key stat: With a margin of 10 points, this was South Africa's biggest World Cup defeat since losing 29-9 to the All Blacks in the 2003 quarter-finals.
Pool B: South Africa 57 Namibia 3
Rassie Erasmus rotated his squad for the Springboks' second match and faced little resistance as they eased past Namibia. Bongi Mbonambi and Makazole Mapimpi each scored two of South Africa's nine tries for a result that kick-started their campaign.
Key stat: Schalk Brits, 38, became the second oldest try scorer in World Cup history. Uruguay's Diego Ormaechea scored against Spain in 1999 aged 40.
Pool B: South Africa 49 Italy 3
South Africa ran riot against 14-man Italy, the impressive Cheslin Kolbe scoring twice while Mbonambi, Lukhanyo Am, Mapimpi, RG Snyman and Malcolm Marx also got on the scoresheet. Italy spent the majority of the second half with 14 players after Andrea Lovotti was sent off for a dangerous challenge on Duane Vermeulen.
Key stat: Handre Pollard took his career tally in the World Cup to 115 points, surpassing Percy Montgomery's 111 for the Springboks record.
Pool B: South Africa 66 Canada 7
Cobus Reinach was the star of the show for the Springboks as they romped to victory against Canada, scoring three tries in the space of 11 minutes as Erasmus' men stormed into the quarter-finals, finishing as runners-up in their pool after the cancellation of New Zealand's clash with Italy gave the All Blacks two points that lifted them to the summit.
Key stat: Reinach's hat-trick was the quickest in World Cup history, completing his treble in the 21st minute. Australia's Chris Latham previously held the record for three tries in the first 25 minutes against Namibia in 2003.
Quarter-final: South Africa 26 Japan 3
Tendai Mtawarira was lucky to escape a red card as the Springboks powered past hosts Japan. Mtawarira upended Keita Inagaki midway through the first half and was sin-binned for the crude tackle, leaving Japan frustrated with the level of punishment. Mapimpi bagged a brace and Faf De Klerk also raced in, with Pollard posting 11 points off the tee as South Africa squeezed the life out of the Brave Blossoms.
Key stat: Mapimpi has scored 13 tries in 12 Test appearances after touching down twice against Japan.