Paulinho headed Brazil into the Confederations Cup final with an 86th minute header to give the host nation a 2-1 victory over Uruguay on Wednesday as anti-government protesters clashed with police near the Mineirao Stadium.
With the semifinal heading into extra time, Paulinho rose to meet Neymar's corner.
Paulinho and Neymar also combined to play a part in Brazil's opener just before half time after Uruguay striker Diego Forlan's penalty was saved.
Neymar brought down Paulinho's high ball and, after his initial shot was saved by goalkeeper Fernando Muslera, Fred pounced on the loose ball to score.
Although Edinson Cavani seized on sloppy defending to equalize for Uruguay three minutes into the second half, Brazil fought back to secure victory in the World Cup warm-up tournament.