Former Italy midfielder Andrea Pirlo has announced he is retiring from football after playing his last game for New York City.

The 38-year-old won 116 caps for Italy and helped them win the 2006 World Cup.

Pirlo began his career at Brescia and also played for Inter, AC Milan and Juventus before joining the Major League Soccer side two years ago.

"Not only [is it that] my adventure in New York comes to an end but my journey as a football player as well," he said.

In a statement posted on his Twitter account, Pirlo also thanked "every team that I had the honour to play for" and "every team-mate that I have been pleased to play alongside".

Former club Juventus described him as a "true genius".

And New York City manager Patrick Vieira said Pirlo "changed football forever".

As well as helping the Azzurri become world champions, Pirlo also won many domestic honours during his 22-year career.

He was part of a Milan side who won two Serie A titles, two Champions Leagues and a Club World Cup between 2003 and 2011, then was instrumental in Juventus winning four successive Scudettos between 2012 and 2015.

The Italian moved to New York ahead of the 2015 MLS season, joining former England midfielder Frank Lampard and Spain striker David Villa at the Manchester City-owned franchise.

He has helped Patrick Vieira's side reach the MLS play-offs in each of the past two seasons, but was unable to end his career with any further trophies.

Pirlo had indicated in an interview with Gazzetta dello Sport in October that he was preparing for retirement, and confirmed that decision with his statement.

"Everyone at New York City FC would like to congratulate Andrea on an incredible career and to thank him for his excellent contribution to NYCFC over the past two and a half years." the club said.

Former Arsenal and France midfielder Vieira, who has been Pirlo's manager at New York City for the last two years, said: "He's one of the best holding midfielders ever - he changed the position of the number six.

"Before, the role was just tackling and winning the ball, but now you have to be a playmaker, you have to be as good as your number 10 with the ball.

"He had a fantastic career, not just on the field but off it because he's a true gentleman. He's a really good guy."

Pirlo's final professional appearance came as a 90th-minute substitute against Columbus Crew in the MLS Eastern Conference play-off semi-final

Pirlo's career in numbers

872 games

6 Serie A titles

2 Coppa Italia wins

2 Champions League triumphs

1 World Cup success

'A beautiful footballer'

New York City FC tweeted their thanks to their former midfielder

AC Milan wished Pirlo well and listed his achievements during a 10-year spell at the Rossoneri

Juventus paid tribute to the man who helped them win seven major honours in a four-year spell

Former England striker Gary Lineker hailed Pirlo's achievements following his retirement

'You will always be in my heart' - Pirlo's full retirement statement

As my time in NYFC comes to an end, I would like to say a few words.

I want to thank everybody for the kindness and support they have shown me in this incredible city.

Thank you to the amazing supporters, thank you to the coaching staff and everybody that works behind the scenes, thank you to my team-mates.

Not only my adventure in NY comes to an end but my journey as a football player as well.

That is why I would like to take the opportunity to thank my family and children for the support and love they always give me, every team that I had the honour to play for, every team-mate that I have been pleased to play alongside, all the people that made my career so incredible, and last but not least, all the fans around the world that always showed me support.

You will always be on my side and in my heart.