David Beckham will return to AC Milan on loan in January after the Italian club reached an agreement with the Los Angeles Galaxy of Major League Soccer.

The England midfielder played for Milan for six months in the first half of the year. He scored two goals in 18 games and has won back his place on England's national team.

"I need to give myself the best chance possible to make the World Cup squad and playing for Milan on loan will help me to do that," Beckham said in a statement. "I genuinely enjoyed my time at Milan and I look forward to meeting the players and staff again."

AC Milan and the Galaxy came to an agreement Monday after weeks of negotiations.

"We are delighted to see David Beckham back in the red-and-black shirt after his splendid experience last season," AC Milan vice president Adriano Galliani said on the club's Web site.

"We are sure that this period in Europe will help him make it to the next World Cup, and after that his career with Los Angeles Galaxy. We must thank them for agreeing to this deal."

The Galaxy is currently making its first postseason appearance since Beckham joined the team. Following the conclusion of its season, Beckham will join the Galaxy for its postseason tour that ends Dec. 2.

Beckham will join AC Milan on Dec. 28 and remain with the team through the end of its season on May 16. He will rejoin the Galaxy when the summer transfer window opens in July.

"I'm committed to LA Galaxy and MLS in the long term and remain as passionate as ever about growing the game of soccer in America," Beckham said. "I'm completely focused on ending this season on a high note with my club by winning the MLS Cup."

The Galaxy and Chivas USA played to a 2-2 tie in their opening playoff game Sunday.

In March 2009 against Slovakia, during his time with Milan, Beckham became England's second most capped player when he broke Bobby Moore's record of 108 international appearances.

Currently, Beckham has played 115 internationals, with only former goalkeeper Peter Shilton ahead of him with 125.

It was England manager Fabio Capello who pushed Beckham to join a European club on loan in early 2009 to maintain his fitness during Major League Soccer's offseason.

Originally, it was scheduled to be a three-month agreement until the start of the MLS season. But such was his success that both Beckham and Milan sought to extend the loan period until the end of the European season.

Having helped Milan reach the Champions League, Beckham returned to the Galaxy to receive a hostile reaction from some supporters and be criticized in print by teammate Landon Donovan.

The former Manchester United and Real Madrid midfielder did little to smooth relations when confronted by some abusive fans during games.

Since then, Beckham has won over supporters by helping Los Angeles into the playoffs and he patched up his differences with Donovan.

If the 34-year-old Beckham does make it to next year's tournament in South Africa, it will his fourth World Cup.

He was made the scapegoat for England's exit in the round of 16 at the 1998 tournament in France after being sent off before the penalty shootout loss to Argentina.

Four years later in Japan and Korea, Beckham was recovering from a broken metatarsal and criticized for jumping out of a tackle just before Brazil equalized in England's quarterfinal loss.

In 2006 at Germany, Beckham finished the tournament in tears after injury meant he was unable to play a part in the latter stages of England's penalty shootout defeat to Portugal in the quarterfinals.