Warren Gatland returns for his second stint as Wales head coach just three years after walking away from the job having overseen a golden era of Welsh rugby.

Gatland has hastily replaced fellow New Zealander Wayne Pivac, under whom Wales lifted the 2021 Six Nations but won just 13 of 34 tests, suffering sobering defeats this year to Georgia and Italy.

Hamilton-born Gatland, 59, coached the Welsh from 2008 until 2019 and is now tasked with getting them back on track for the 2023 Six Nations and next year's Rugby World Cup.

He has spent the last three years as head coach and then director of rugby for the Chiefs Super Rugby franchise.

"I want to thank the Chiefs. This was a big decision and leaving a team like this was always going to be hard," Gatland said in a statement.

"However, I am looking forward to taking on this new challenge."

It's a similar situation to Gatland's first coaching stint with Wales when he took over a demoralised team that crashed out of the 2007 World Cup following a shock defeat to Fiji.

Gatland turned the team around quickly, winning the Six Nations in 2008, 2012, 2013 and 2019.

In three of those years -- 2008, 2012 and 2019 -- Wales completed the rare "Grand Slam" by winning every game in the Six Nations.

Under Gatland, who also coached the British and Irish Lions on three tours, Welsh success was forged on a robust defence that opponents often struggled to crack.

Alongside hard-nosed defence coach Shaun Edwards, who has since joined France, Gatland gave Wales a tough edge with a conservative, possession-based style of rugby critics dubbed "Warrenball".

- 'One of the very best' -

It bore fruit as Wales repeatedly challenged for the Six Nations title and ended a miserable run against southern hemisphere teams Australia and South Africa.

Australia's 13-game winning streak against Wales ended in 2018 when the Welsh ground out a 9-6 win over the Wallabies in Cardiff.

Gatland coached Wales to five wins over the Springboks, although South Africa pushed them out of consecutive World Cups in 2015 and 2019 at the knock-out stage.

Gatland, a former All Blacks hooker, coached Wales against New Zealand in 12 games but never won.

A 40-17 defeat against the All Blacks in the bronze medal match at the 2019 World Cup was his last game in charge.

Under Gatland's stewardship, Wales twice reached the World Cup semi-finals, losing 9-8 to France in Auckland in 2011 despite playing for nearly an hour with 14 men, then again losing to the Springboks in 2019.

His return to Wales comes with less than a year to go before the 2023 Rugby World Cup kicks off in France.

Gatland's return was announced by the Welsh Rugby Union on Monday and their chief executive Steve Phillips praised the New Zealander as "one of the very best coaches in the international game".

"We were sorry to see him go when he left and we are delighted that he has agreed to return," he added.