Paul Scholes's precise role within the Manchester United coaching setup has yet to be defined. Photograph: Richard Sellers/Sportsphoto/Sportsphoto Ltd./Allstar

After a Manchester United first-team career spanning 17 years and 676 appearances, Paul Scholes has announced his retirement with immediate effect. There had been speculation about the 36-year-old's future in the past few weeks after he became increasingly dissatisfied with his bit-part role, and he will now take up a coaching position at Old Trafford from next season.

The famously shy midfielder said: "I am not a man of many words but I can honestly say that playing football is all I have ever wanted to do. To have had such a long and successful career at Manchester United has been a real honour. To have been part of the team that helped the club reach a record 19th title is a great privilege.

"This was not a decision I have taken lightly but I feel now is the right time for me to stop playing. I would like to thank the fans for their tremendous support throughout my career, I would also like to thank all the coaches and players that I have worked with over the years.

"But most of all I would like to thank Sir Alex [Ferguson] for being such a great manager. From the day I joined the club his door has always been open and I know this team will go on to win many more trophies under his leadership."

A member of the famed class of '92, who won the FA Youth Cup, Scholes made his debut in 1994, and his last game was Saturday's Champions League final defeat to Barcelona. He won 10 Premier League titles and, after missing the 1999 Champions League final through suspension, was part of the team that beat Chelsea in the Moscow final of 2008.

"What more can I say about Paul Scholes that I haven't said before?" Ferguson said. "We are going to miss a truly unbelievable player. Paul has always been fully committed to this club and I am delighted he will be joining the coaching staff. Paul has always been inspirational to players of all ages and we know that will continue."

Scholes's precise role within the United coaching setup has still to be confirmed, although there could be an opening available with the reserves, where Warren Joyce has been acting alone since the departure of Ole Gunnar Solskjaer. The former England international will also be granted a testimonial, which will take place in August.

Wayne Rooney said Scholes is "the best player" he has ever played with. "He will be missed greatly," Rooney added. "I tried to ask him what he was doing but you don't get much out of him. I didn't think it would come this quickly. Everyone will be sad to see him stop. He is a great player."

"It is a very sad day for Manchester United fans around the world," David Gill, the United chief executive, said. "Paul has established himself as one of the greatest players to ever wear the United shirt. It is very important that the club keeps the association with these great players and we are delighted that Paul will join the coaching staff."