Brazilians paid their last respects Sunday to football legend Mario Zagallo, after the four-time World Cup-winning player and coach died at age 92, the final member of one of the country's greatest footballing generations.

Dressed in black, the yellow of the Brazilian national team or the colors of the clubs where Zagallo played and coached, scores of mourners filed past his coffin at the headquarters of the Brazilian Football Confederation (CBF) in Rio de Janeiro.

Also on display near the lace-draped coffin were football-mad Brazil's record five World Cup trophies.

Zagallo, a diminutive left-wing known for his tactical brilliance, had a hand in winning four of them, more than anyone in football history.

The "Professor," as he was known, played alongside Pele in Brazil's 1958 and 1962 World Cup-winning teams.

He then went on to coach the 1970 world champion side starring Pele -- considered by many the greatest team in history -- and serve as assistant coach when the "Selecao" repeated the feat in 1994.

"He made football history. It's a tremendous loss," said Eduardo Bandeira de Mello, former president of famed club Flamengo, where Zagallo was both a player and manager.

"What he did with the national team in 1970 should be an inspiration to every coach," he told AFP.

Zagallo died Friday of multiple organ failure at a Rio hospital, after suffering a series of health problems in recent months.

The public wake will be followed by a private mass, then a burial at the Sao Joao Batista cemetery, the final resting place of some of Brazil's most famous citizens.

President Luiz Inacio Lula da Silva, who called Zagallo "one of the greatest football players and coaches of all time," declared three days of national mourning from Saturday, ordering flags flown at half-mast across Brazil.

Tributes have also poured in from the football world.

FIFA president Gianni Infantino said Zagallo's influence on football was "supreme," World Cup winners Ronaldinho, Romario and Cafu paid homage, and current Brazil and Real Madrid star Vinicius Junior simply called him "LEGEND."

The only other men to win the World Cup as both player and coach are Franz Beckenbauer of Germany (1974 and 1990) and Didier Deschamps of France (1998 and 2018).