Picking the greatest XI in football history is pretty much an impossible task.

Every single person who follows the sport has differing opinions on who are the greatest to have graced the pitch in a professional setting.

The only two players we reckon feature in 99% of XIs are eternal rivals Lionel Messi and Cristiano Ronaldo, although some of the older generation will opt for the likes of Pele, Diego Maradona and Johan Cruyff over the pair of Ballon d'Or hoarders.

We're not going to try and name an XI, as it's just far too difficult. Instead, we're going to work out the finest team in football history from the 2.9 million votes cast by fans on Ranker's 'The Best Soccer Players of All Time' list.

The collection of players selected is very impressive and naturally, there are a few surprises chucked in the mix as well.

Let's take a look at the XI...

GK - Gianluigi Buffon

No Lev Yashin, Iker Casillas, Peter Schmeichel or Manuel Neuer. Buffon is undoubtedly one of the all-time greats when it comes to goalkeeping, but the best of the bunch? Perhaps not, especially as he was never able to win the Champions League. Buffon did help Italy win the World Cup in 2006, though.

RB - Cafu

It's hard to argue with this selection by the fans. Cafu, who is Brazil's record appearance maker with 142 caps, excelled in both attack and defence, winning a plethora of trophies with Sao Paolo, AS Roma, AC Milan and - of course - his country. Cafu was named in the 'Ballon d'Or Dream Team' in 2020, which further highlights what an exceptional footballer he was.

Brazil legend Cafu with the World Cup trophy
Foot : Final, Germany - Brazil, Wc 2002 /Cafu, Trophee, Coupe, Beker, Cup, Joie, Celebration, Vreugde, Trophy, Trofee /Allemagne, Duitsland, Bresil, Brasil, (Photo by Tim De Waele/Getty Images)

Foot : Final, Germany - Brazil, Wc 2002 /Cafu, Trophee, Coupe, Beker, Cup, Joie, Celebration, Vreugde, Trophy, Trofee /Allemagne, Duitsland, Bresil, Brasil, (Photo by Tim De Waele/Getty Images)

CB - Sergio Ramos

One of the greatest captains the sport has ever seen. Ramos' leadership qualities and pragmatic excellence helped Real Madrid win four Champions Leagues in the space of five years, while he was key to Spain's vice-like grip over international football between 2008 and 2012. Ramos also has over 100 career goals, which isn't normal for a centre-back.

CB - Carles Puyol

It's Spanish dominance at centre-back, with no place for Franz Beckenbauer or Franco Baresi. Puyol was a real warrior and like Ramos, the curly-haired defender was part of the reason why Spain won three major trophies in just four years. Puyol was equally magnificent for Barcelona, particularly under Pep Guardiola. The Catalan club are yet to replace him, despite the fact he retired in 2014.

LB - Roberto Carlos

Carlos over Maldini? Interesting. The Brazilian was a world-class operator for many years, although he was far better at the offensive side of the game. Carlos certainly wasn't a bad defender, though, and that's why the 1997 FIFA World Player of the Year award was placed in his hands. Maldini might have the slight edge overall, but Carlos - with his undeniable X-Factor - is still a worthy winner.

Roberto Carlos in action with Real Madrid
9 May 2000: Roberto Carlos of Real Madrid on the ball during the UEFA Champions League semi-final second leg match against Bayern Munich at the Olympiastadion in Munich, Germany. Bayern won 2-1 on the night but went out 3-2 on aggregate. Mandatory Credit: Stu Forster /Allsport

9 May 2000: Roberto Carlos of Real Madrid on the ball during the UEFA Champions League semi-final second leg match against Bayern Munich at the Olympiastadion in Munich, Germany. Bayern won 2-1 on the night but went out 3-2 on aggregate. \ Mandatory Credit: Stu Forster /Allsport

RM - Lionel Messi

No arguments can be had here. In the eyes of many, Messi is the greatest footballer in history and has won a record seven Ballon d'Ors. The diminutive forward is Argentina's all-time leading scorer with 86 goals, has 767 goals overall and has won 40 trophies. There's still more to come from the Paris Saint-Germain superstar as well.

CM - Zinedine Zidane

Another top selection by the fans. Zidane could do it all in the middle of the park and the Frenchman's first touch might just be the best ever witnessed on a football pitch. 'Zizou' was world-class for years at both Juventus and Real Madrid, while he also won France their first ever World Cup with a brace against Brazil in the 1998 final. A bona fide footballing legend.

CM - Andres Iniesta

Iniesta gets the nod over his partner-in-crime Xavi Hernandez. The Spaniard was a wizard with the ball at his feet and remains the only player to be named Man of the Match in the finals of the World Cup, European Championship and Champions League. Like with Puyol, Barcelona are yet to find the heir to Iniesta's throne and to be honest, they probably never will.

Andres Iniesta lifts a trophy with Barcelona
BARCELONA, SPAIN - APRIL 21: Andres Iniesta of FC Barcelona lifts the trophy after winning with his team the Spanish Copa del Rey Final match between Barcelona and Sevilla at Wanda Metropolitano stadium on April 21, 2018 in Barcelona, Spain. (Photo by David Ramos/Getty Images)

BARCELONA, SPAIN - APRIL 21: Andres Iniesta of FC Barcelona lifts the trophy after winning with his team the Spanish Copa del Rey Final match between Barcelona and Sevilla at Wanda Metropolitano stadium on April 21, 2018 in Barcelona, Spain. (Photo by David Ramos/Getty Images)

LM - Cristiano Ronaldo

As with Messi, no arguments can be made here whatsoever. Ronaldo is the leading scorer in men's professional football with 815 goals for club and country. The Portuguese icon has won five Ballon d'Ors and the same number of Champions Leagues, with the forward showing no signs of slowing down either. Scoring 24 goals in the worst Manchester United side of the Premier League era at the age of 37 is almost enough in itself to warrant a place in the XI.

ST - Ronaldo Nazario

If he had avoided serious knee injuries, Ronaldo would almost certainly be competing with Cristiano and Messi for the title of the greatest footballer in history. The Brazilian was terrifyingly good, a deadly mix of speed, power, skill and prolificacy. Arguably Ronaldo's finest hour was when he scored a brace in the 2002 World Cup final, winning the tournament's Golden Boot award in the process.

ST - Pele

So, no Maradona or Cruyff in the XI, but Pele makes the cut - which is fair enough. He's the only footballer in history to win three World Cups (1958, 1962 & 1970) and is one of the most prominent goalscorers in history. Pele rippled the back of the net for fun with Santos and bagged 77 goals in just 92 appearances for Brazil. Neymar will surpass that total in due course, though.

The greatest XI in history

VOTE NOW: The GMS Player of the Season Fan Awards