Joe Root, England's Test captain, says that Moeen Ali will be remembered as a "wonderful role model" and "one of the great guys to play alongside", in the wake of his decision to retire from Test cricket, but admits he'll have some regrets about the circumstances that persuaded one of England's premier allrounders to focus his attentions on the white-ball form of the game.

Moeen confirmed his decision in a joint interview with ESPNcricinfo and the Guardian on Monday morning, claiming that he had struggled to "get into the zone" during his three-match comeback against India this summer. He also admitted that the circumstances of his axing from the squad in 2019, when he was omitted after the first Ashes Test at Edgbaston then lost his ECB central contract later that summer, "did break [him] a little bit".

Root captained Moeen in 27 of his 64 Tests, including his very first match in the role, at Lord's in 2017, when Root himself scored 190 while Moeen was named Player of the Match for his ten-wicket haul and an innings of 87 from 149 balls. He finished that same series with a remarkable double of 252 runs and 25 wickets - the first player in Test history to do so in a four-match series. That tally included a hat-trick at The Oval, while in his retirement interview, he recalled his carefree half-century in the final Test at Old Trafford as the single best day of his career.

"First and foremost, it goes without saying that Mo's career speaks for itself and what he has achieved," Root said during a Zoom interview organised by the PCA. "He's done some wonderful things in Test cricket. He's been one of the great guys to play alongside. I've thoroughly enjoyed sharing that dressing room with him and we've had so many wonderful memories, on the field and off the field."

However, Moeen's more recent Test experience has been mixed, including a bout of Covid-19 that caused him to isolate during the series in Sri Lanka in January, as well as an unfortunate misunderstanding in the wake of his departure from the subsequent tour of India, when Root erroneously stated that he had "chosen" to go home, when in fact his time off had been pre-arranged under the ECB's rest-and-rotation policy.

"There are a number of things I'll look back on when I'm finished as captain, that I could look back on with regret that I could have done slightly differently," Root admitted.

"The one thing I will say is when Mo has played, he's been brilliant. You look at the amount of games he has affected, the amount of special moments he has had on a cricket field in the Test match format has been exceptional. I'll certainly remember a lot of amazing things that he has achieved. Of course, there might have been times we could have done things slightly differently, but I could say that about a lot of things."

Moeen was not considered for selection in the first three Tests of the 2021 summer - including the drawn first match against India at Trent Bridge, despite claiming eight wickets against the same opponents at Chennai in February - and Root admitted he had not been aware that Moeen felt "he was on a different path" to the rest of the team prior to his announcement, even after he was named as his vice-captain for what turned out to be his final Test at the Kia Oval last month.

"I didn't at the time, no," Root said. "I've spoken to him in the past week and the way he has dealt with it has been, as you'd expect, first-class. But he'll be a huge loss to the group for so many different reasons. But more than anything I just want to wish him well for everything he has got coming up and the rest of his career because he's still going to go on and achieve so many great things, I'm certain of it.

"I think at times he has been underappreciated. Not within the dressing room but outside of that. He'll be a huge loss. He's a great personality to have in and around the dressing room, and he's a great brain for younger players to learn from and to feed off. I just wish him every success in everything he chooses to do from now. Hopefully there's a lot of cricket I can still get to play with him in the ODI side with England as well."

Moeen's immediate focus will be on the IPL, where he is back playing for Chennai Super Kings in the UAE, following the tournament's resumption last week. After that, he will be competing for a berth in England's T20 World Cup team, while on the domestic front, his status as a homegrown captain of Birmingham Phoenix in the Hundred means that he will remain a significant figure in English cricket for the foreseeable.

"He's been a wonderful role model," Root said. "I really hope that, off the back of what he has done and achieved at Test cricket, there will be so many young boys and girls out there wanting to follow in his footsteps because he's done fabulous things. The way he holds himself. The way he carries himself, the way he goes about things is fantastic. He leaves a legacy."

Andrew Miller is UK editor of ESPNcricinfo. @miller_cricket