Warren Gatland's final game as Wales head coach ended in defeat as New Zealand beat Wales 40-17 in their World Cup third-place play-off match in Tokyo.

Wales tried valiantly to break the All Blacks' line but New Zealand had done more than enough to secure the bronze medal.

There was sufficient time for Mo'unga to score his team's sixth try three minutes from the end as the All Blacks hit 40 points.

New Zealand's 40-17 victory was a 31st successive Test match win against Wales, and they have not lost in the fixture since 1953.

The game marks an end to Warren Gatland's 12 year reign as Wales head coach - highlighted by four Six Nations titles, three Grand Slams and two World Cup semi-final appearances.

New Zealand's Richie Mo'unga scores his sides sixth try during the 2019 Rugby World Cup bronze final match at Tokyo Stadium Credit: PA Images

"I've loved my time in Wales, the people have been amazing and incredibly welcoming", Gatland said straight after the final whistle.

"But that era is over now and I'm excited about the next challenge, going back to New Zealand and being involved with the Chiefs".

Wales captain Alun Wyn Jones said despite the result, he and the squad were proud to put the jersey on to "show what we had to bring today".

"The majority of the squad have their caps under Gats", Jones said post-match.

"He's been here for a good, successful 12 years. We didn't want to go out like this for him, but his legacy is much stronger than one game."

New Zealand had the game sewn up by half-time through wing Ben Smith's try double, plus touchdowns for prop Joe Moody and full-back Beauden Barrett, with fly-half Richie Mo'unga kicking four conversions.

Wales countered through Hallam Amos' clever try and five points from Rhys Patchell, but centre Ryan Crotty's try and another Mo'unga conversion early in the second-half finished them off before Mo'unga added a late touchdown.

Wing Josh Adams scored a second Wales try, though, giving him seven in the tournament and breaking Shane Williams' Wales record for one World Cup campaign that he set 12 years ago.

Dan Biggar converted, leaving an under-strength Wales to take considerable comfort from a battling display that bodes well for their future under Gatland's successor Wayne Pivac.

Gatland made nine changes for his final game in charge, with injuries sidelining players like Leigh Halfpenny, George North and Aaron Wainwright, while wing Owen Lane made a World Cup debut and lock Adam Beard also started.

All Blacks boss Steve Hansen, who is also standing down after the tournament, included the likes of centre Sonny Bill Williams, wing Rieko Ioane and flanker Sam Cane.