Kane Williamson has stepped down as New Zealand Test captain and has been replaced by Tim Southee, the country's cricket board (NZC) said on Thursday.
After taking charge in 2016 Williamson captained New Zealand in 40 Tests - with 22 wins, 10 defeats and eight draws - and led the team to victory over India in the inaugural World Test Championship final in 2021.
"For me, test cricket is the pinnacle of the game and I've enjoyed the challenges of leading the side in the format," said Williamson.
"Captaincy comes with an increased workload on and off the field and at this stage of my career I feel the time is right for this decision."
Williamson will remain New Zealand's white-ball captain and he said he will continue to play in all three formats.
Southee, who stood in as captain for 22 Twenty20 internationals between 2017-21, will lead the test team on their next assignment - a two-match series in Pakistan starting later this month.
"It's been a surreal few days and it's just a massive honour to be appointed as test captain," Southee said.
"I love test cricket, it's the ultimate challenge and I'm really excited by the opportunity to lead the team in this format."
NZC also announced their squad for the tour of Pakistan on Thursday, with spinner Ish Sodhi returning to the test team four years after his last appearance in the longest format.
Batsman Glenn Phillips, whose only previous test match appearance for New Zealand came against Australia in 2020, was also included in the squad, while fast bowlers Trent Boult (unavailable) and Kyle Jamieson (back injury) missed out.
New Zealand squad:
Tim Southee (capt), Michael Bracewell, Tom Blundell, Devon Conway, Matt Henry, Tom Latham, Daryl Mitchell, Henry Nicholls, Ajaz Patel, Glenn Phillips, Ish Sodhi, Blair Tickner, Neil Wagner, Kane Williamson, Will Young