BELO HORIZONTE, Brazil — Paulinho scored on a header from Neymar's corner kick in the 86th minute, and Brazil beat Uruguay 2-1 Wednesday night to reach the Confederations Cup final as anti-government protesters clashed with police near Mineirao Stadium.

Seeking its third straight title in the World Cup preparation tournament, Brazil will play Spain or Italy in Sunday's final at Rio de Janeiro.

Diego Forlan could have put Uruguay ahead in the 14th minute, but goalkeeper Julio Cesar dived to his left to stop Forlan's low penalty kick after Brazilian defender David Luiz was called for tugging the shirt of Diego Lugano.

Brazil took the lead in the 41st. Neymar brought down Paulinho's high ball and goalkeeper Fernando Muslera saved Neymar's shot, with Fred scoring off the rebound.

Edinson Cavani took advantage of sloppy defending to tie the score three minutes into the second half.