Italy midfielder Andrea Pirlo is relishing the challenge ahead after leaving Juventus for Major League Soccer side New York City FC.

The 36-year-old has long been linked with a move to the United States and it has now been confirmed by both clubs that he will join Spain's all-time record goalscorer David Villa and former England midfielder Frank Lampard in the Big Apple.

A statement from Juventus read: "Andrea Pirlo has announced that he will continue his career in the United States, bringing the curtain down on four extraordinary seasons with the Bianconeri.

"Pirlo has ended his magnificent four-year stay at Juventus after officially completing a move to MLS outfit New York City."

Pirlo, who had one year left on his contract with Juve, helped the Turin giants win the domestic double – for the first time since 1995 – and reach the Champions League final last season.

But he is now looking forward to the next chapter in his career, and he told NYCFC.com: "I have been wanting this experience for a long time and now that the opportunity materialised I wanted to take it. This is a club on the rise and shares my same hunger to achieve important results in the league. I am hoping to win.

"I had several opportunities to play outside of Italy, but I never had a doubt in picking New York for the enthusiasm of the people that come watch the team.

"I met with the coach, Jason Kreis, and he gave me a fantastic impression of the club. He has well-defined ideas in mind, and I am sure we will get on well and create a good relationship to train well and try to win together."

Pirlo started 30 games for Juve in 2014-15, including last month's Champions League defeat to Barcelona, and scored five goals and set up five more.

A set-piece specialist, Pirlo has made 115 appearances for Italy and was a key player in helping the Azzurri lift the World Cup in 2006.

He joined Juventus in 2011 after a decade playing for AC Milan and has been a regular in the Bianconeri's squad since.

Pirlo bid an emotional farewell on Twitter, posting: "It's difficult to transform emotions into words, especially when considering four very important years in my life.

"I can only say an enormous thank you to those that have accompanied and supported me on this journey.

"The Juventus club, with the president at the helm, without forgetting every single person that works at the club: my team-mates whom I've shared a lot of battles, many laughs and a few tears; all the fans that have followed me even at times when things weren't going well ... Thanks to all of you.

"It wasn't easy to decide, but the time has come to begin a new adventure. But I will never forget my link to these colours. Until the end, FORZA JUVENTUS."

Pirlo, who won six Serie A titles in total and two Champions League crowns with the Rossoneri, will join up with his new club on July 21. He is expected to sign an 18-month contract.