The England international arrived in Italy in January in what was largely regarded as a publicity stunt by the Serie A club, but he has become an essential part of Ancelotti's side, even surprising the Rossoneri coach in the process.

"Beckham has done more than we could have possibly expected from him," Ancelotti told PA Sport.

"He has settled in very well with the squad and given a huge contribution up to now.

"He is very professional and we are all very, very happy that he is staying."

The 33-year-old played in an unfamiliar support role behind strikers Filippo Inzaghi and Pato in today's 3-0 win over Atalanta and, although Ancelotti admitted to being "a little worried" about playing him in a new position, he was more than happy with the result.

The Milan coach praised the versatility of the former Manchester United and Real Madrid midfielder which he can now count on until the end of the season.

"He played very well," said Ancelotti. "I was a little worried about it at the start, but he is an intelligent player and knows what was required of him in that role.

"I am happy for him above all that he is staying.

"The aim was to keep him until June 30 and we have done that. He is very happy with the solution that has been found and we will make the most of having him now and then we will see."

Beckham will return to the Los Angeles Galaxy at the end of June, but could become an issue again for Milan at the end of November, when he can leave the Major League Soccer side.

And Ancelotti confirmed his club would evaluate the situation having found a solution which he believes is satisfactory for everybody right now.

"The two clubs met and agreed on a compromise which matched the player's wishes," he said.

"It was not possible to make it a permanent move so we have him temporarily.

"In November, we will have to see what happens."

Beckham's team-mate Mathieu Flamini admitted he too was happy the former England captain's future had been resolved and he will be able to play alongside him until the end of the season, even if both players may be competing for the same position when Gennaro Gattuso, Massimo Ambrosini and Kaka recover from injuries.

"I am happy for him," he said. "I am glad that he can keep playing here and at the same time prepare well for the England national team.

"It is a particularly good solution for him."

Beckham himself tonight welcomed the extension of his stay with Milan and made Champions League qualification a priority.

Milan currently stand third in Serie A, which would be enough to take them into the Champions League qualifying stages.

He said on Sky Sports News: "I want to stay here in Milan to help the team qualify for the Champions League because it's so important for a club like AC Milan to be in the Champions League.

"It's not just about the money the teams get from qualifying, it's about the whole legacy of big clubs and that's where they belong; AC Milan belong in the Champions League.

"Hopefully I can be a part of that and part of taking the team to the (group) stages next year."

He welcomed the agreement between Milan and LA Galaxy, and confirmed his own sacrifice in helping the deal go through, which is thought to have been financial.

"I've done really well in my career, I've played for so many great clubs and I've been able to help myself stay in Milan, if I can put it that way," he said.

"My career has always been about playing football.

"People have talked about the money I've earned in my career but it's never been about money for me, it's always been about the football and my passion for football."

Beckham, who according to reports could take over an MLS franchise in the future, confirmed he will have a break between the end of the Italian season and his first match back for the Galaxy.

He explained: "Once I finish the season here I'll have about four weeks' break and then I'll go back to Los Angeles and play for the Galaxy for the rest of the season, which will be good. It's something I'm very committed to."