The All Blacks’ head of security Logan Cadwallader has died in Edinburgh following a medical event.

The All Blacks are in the city ahead of this weekend's test against Scotland at Murrayfield.

In a statement, New Zealand Rugby said Cadwallader suffered a medical event at the team hotel.

NZ Rugby said Cadwallader had been part of the All Blacks environment for 10 years and had become a much-loved and respected member of the team.

All Blacks head coach Dave Rennie said the team was struggling to come to terms with the news.

"Logan has been a big part of the All Blacks family for a long time. He was the ultimate team man, loved and trusted by all and a true professional. He looked after all of us, players and staff, and he was a good mate to many in this team.

"We are all devastated. Our thoughts are with his wife, Nannette, his children, Trey, Brooke and Mia, and his wider family and friends. As a team, we will honour Logan and the legacy he has left on the All Blacks."

NZ Rugby Chief Executive Steve Lancaster said Cadwallader was a good man who was highly respected by those that worked with him.

"Logan was a valued and trusted member of the management group over the past decade, and he will be greatly missed by everyone who worked alongside him. On behalf of New Zealand Rugby, I extend our deepest sympathies to his family and friends at this very difficult time."

Before working with the All Blacks, Cadwallader served in the New Zealand Army and New Zealand Special Air Service Regiment (NZSAS), with deployments to countries including Bosnia, East Timor, Afghanistan and the Solomon Islands.

NZ Rugby said it was supporting Logan's family, as well as All Blacks players and staff.