Warren Gatland will be in charge of Barbarians when they line-up against Wales at Principality Stadium in November.
The 55-year-old will end a 12-year association with Wales post the World Cup scheduled in Japan later this year and will be replaced by current Scarlets head coach Wayne Pivac.
However, Gatland, who has guided Wales to four Six Nations title including three Grand Slams will be facing his former side against Pivac.
"It goes without saying that this match has huge significance to me," said Gatland.
"Wales has been my home for the last 12 years and I have thoroughly enjoyed my time here.
"We have had some great success with Wales and we are currently in a hugely important year, culminating at the World Cup.
"To have the opportunity to return to Cardiff after the World Cup is fantastic.
"It will be an honour to coach the Barbarians, they symbolise the very best of rugby tradition and are an important part of the international game and I'm hugely looking forward to being part of the Baa-baas club."
Gatland will also coach the British and Irish Lions during their 2021 tour of South Africa after successfully coaching them during the 2013 and 2017 tours of Australia and New Zealand respectively.
The game on 30th November will also see Wales Women's side facing Barbarians Women for the first time in the history of the game.