Danilo had just returned from a right hip injury he suffered during Brazil's opening game against Switzerland and will now miss the rest of the tournament.
SOCHI, Russia—Brazil right-back Danilo is out of the World Cup after injuring his ankle in training.
The Brazilian soccer federation said Danilo suffered a ligament injury in his left ankle during the team's training session in Kazan on Thursday, a day before Brazil plays Belgium in the quarterfinals.
The federation said early Friday that tests confirmed the player will not be able to recover in time to play again during the tournament in Russia.
The Manchester City player will remain with the squad while undergoing treatment.
Danilo played in Brazil's opener against Switzerland but missed the matches against Costa Rica and Serbia because of a right hip injury sustained in training.
He recovered and was available for the 2-0 win against Mexico in the round of 16, but coach Tite kept his replacement, Fagner, in the starting lineup.
Tite said left-back Marcelo, who injured his back in the group-stage game against Serbia, will start against Belgium after fully recovering.
Forward Douglas Costa will also be available for the quarterfinal after recovering from a right thigh muscle injury that prevented him from playing against Serbia and Mexico.