Wayne Rooney has signed a new contract with Manchester United worth around £85m over the next five and a half years that will keep him at the club until he is 33. He is set to become captain next season, with Nemanja Vidic having announced he will leave United this summer.

The news provides a major boost to David Moyes during what is proving a difficult first season as manager following Sir Alex Ferguson's retirement, with United 11 points from a Champions League berth.

After so much talk about Rooney leaving Old Trafford Moyes was ecstatic to keep hold of the striker. "I am thrilled that we have got Wayne Rooney to stay," the United manager said. "He has been fantastic. Everyone would want him in their team. There were clubs who did want him. There were clubs who would have wanted him [had he not signed a new deal] but there was never going to be a chance he was going to leave Manchester United, certainly not on my watch."

Although Rooney had been determined to leave last summer for Chelsea after falling out with Ferguson, the forward is once again enjoying his football under the former Everton manager. He described suggestions that he had demanded a say in transfers and the captaincy before signing his new contract as "laughable and untrue".

"I am made up to be staying at United. In August I will have been at the club for 10 years and during that time I have played with some fantastic players and won everything that I hoped I would when I first signed," Rooney told United's website. "I now have the chance as one of the club's senior players to help the younger players coming through and to be a part of another great United team."

Despite the prospect of the club not being in next season's European Cup, Moyes said that persuading the 28-year-old to re-sign was not a difficult sell.

"He knows by the way I train, by the way I work, by my determination to succeed, that I won't allow this to go the way it is. I'll make changes if it doesn't improve," the manager said.

Rooney himself said: "It's not a massive concern for me. I know the direction that this club is going in, and if we don't make it this season then we will come back stronger and claim a Champions League spot next season. Let's not forget we still have a chance this year, some of the other teams are playing well but we have a strong squad here and if we have a positive end to the season then who knows what can happen."

After Juan Mata's arrival in January for a club record £37.1m Rooney's renewed commitment will give further impetus to Moyes' rebuilding process in the summer. "Part of the rebuilding [process] is making sure that you keep the players you really want to keep.

We are looking to bring the best players in the world to the club. I think Wayne Rooney is one of them. I will be looking to make more signings in the summer.

"All the top players want to play for Manchester United," he said. "I can't tell you the amount of phone calls I've had from top players around the world who want to play for Manchester United," said Moyes.

With talks having begun after Christmas it is understood the football part of the terms were agreed some time ago, – extending Rooney's contract, which had 18 months left to run by an additional four years – with image rights the last hold up decided this week.

Moyes said: "As you know, football deals don't get done quickly now. Very few deals get done. It's been ongoing for a while. I've probably known for three or four months that this would probably happen. In fact I've probably known, felt it, since August. I've known this would have a good chance. We had to wait for things to settle down with the transfer window in the summer."

As for Rooney feeling in the close season that he should leave for Chelsea, Moyes said: "Was it [him staying] in doubt? As far as I was concerned it was never in doubt. The way I looked at this football club was never selling Wayne Rooney. Never."

Rooney has registered 208 goals in 430 appearances for United, so if he stays injury free should become the club's all-time leading scorer, passing Sir Bobby Charlton's mark of 247 goals in 754 games.