Pivac moved to Wales to take over the Scarlets in 2014. He led the regional team to the Pro12 title last year and to the Champions Cup semifinals this year, all the while playing an exciting brand of rugby and filling Gatland's national side.
"I don't feel like an outsider," Pivac said. "The biggest thing about putting myself through this process was that I have been living in Wales for four years. It is an advantage to know regional rugby the way I do, what goes on in the regional game, and working with the WRU. I felt more comfortable putting my name forward and I feel as if I am a Welsh coach."
Pivac, a former New Zealand police constable, led Auckland to a hat trick of domestic titles, and was voted his country's coach of the year in 2003. He coached Fiji and liked it so much he wanted to another taste of test rugby.
As Wales' next coach, he follows in the path of countrymen Graham Henry and Steve Hansen - who went on to coach the All Blacks - and Gatland. "I know I'm following in the footsteps of someone who is held in extremely high regard, not only by the Welsh public, but also by the players who have played under him," Pivac said, "and I will be doing my best to protect the legacy which Warren Gatland, with the help of those players, will inevitably leave behind."
The 55-year-old Pivac will coach the Scarlets for another season and join the Welsh Rugby Union staff next July. Gatland will have been in charge for 12 years when he steps down, making him the longest-serving Wales coach ever.
"We have avoided the feeding frenzy that can come at the end of a RWC year and we have been meticulous in ensuring we have someone of the talent, experience, charisma and rugby acumen to do the very best possible job for Welsh rugby," WRU chief executive Martyn Phillips said.
"The handover process is something we will plan carefully and commence in detail next summer." Gatland said the early announcement of an heir will remove one distraction heading toward the Rugby World Cup.
"The World Cup is a key focus and Wayne's early appointment will help us keep that focus," Gatland said. "Additionally, I'm determined to ensure that Wayne is given the best possible opportunity to succeed in this job when he starts after the World Cup and I will do everything I can to help him."