Watch: Brazil’s Ronaldo earns second goal as he breaks World Cup drought

In an historic victory over Portugal, Lionel Messi scored the winner as Brazil beat the World Cup champions 3-2 in their final group game of the tournament.

Messi’s goal came on a beautiful free kick that flew through the air, and it was the most goal scored by a player in his 20th World Cup qualifying campaign.

Brazil’s Cristiano Ronaldo celebrates after scoring his first World Cup goal in his final World Cup qualifier, against Portugal.

Ronaldo scored the goal that lifted Brazil over Portugal.

(Getty Images) Ronaldo opened the scoring in the second half, with the former Manchester United man curling home a header from a corner to give the home side a 3-1 lead.

The home side responded with goals from Ronaldo, Neymar and Neymar’s Brazilian teammate Neymar da Silva, who netted his fourth of the World Cups tournament with a volley from a free kick.

Neymar had already netted twice in the game, including in the first half, as Portugal held on to win.

Brazil coach Julen Lopetegui, a former world champion, has a history of scoring goals in the World Championship, which takes place in Brazil from Aug. 3 to Aug. 12.

He was a member of Argentina’s team that went to the World Championships in 1994 and 1996.

Brazil, which defeated Uruguay in the semifinals, has won three of its last four games.