TORONTO (AP) — Hulk and Robinho scored either side of halftime to lift Brazil to a 2-1 victory over Chile in an international friendly Tuesday, a game that was both part of World Cup preparations and a spirited match between two South American teams.

Hulk scored in the 14th minute after Oscar intercepted a pass in Chile's territory. Oscar sent a long cross to Hulk, who launched a left-footed shot past goalkeeper Claudio Bravo.

Eduardo Vargas equalized for Chile in the 71st minute, taking a short pass from Jean Beausejour and launching a long shot that tucked just inside the left corner, catching Brazilian keeper Julio Cesar flat-footed.

Robinho gave the Brazilians the win in the 80th minute when he headed in a perfectly placed goalmouth cross from Maicon.

The match featured some of the game's biggest stars — 21-year-old striker Neymar for Brazil, and Chile's Alexis Sanchez. It also marked Brazil's final match of 2013 and part of the team's preparations for the 2014 World Cup in its home country — which coach Luis Felipe Scolari promised last week that Brazil, already five-time World Cup champions, will win.

The No. 11-ranked Brazilians — one spot ahead of Chile in the FIFA rankings — scored from the only shot on net in the first half. But both teams came alive in a fast-paced final 45 minutes, keeping the noisy Rogers Centre crowd on its feet.

In the 56th minute, a shot from Robinho — just a couple of minutes after he entered the game — appeared destined for the net before Bravo dove to clear it.

Less than a minute later, Hulk sent a 20-yard shot off the crossbar.

The Brazilian contingent in the crowd roared whenever Barcelona striker Neymar had the ball, including a spectacular 60-yard run in the first half. Neymar looked poised to score in the 83rd minute with just the goalkeeper to beat only to trip over the ball in the box.

A chanting, singing crowd of more than 30,000 packed the Rogers Centre — home of baseball's Toronto Blue Jays — dressed in either the canary yellow jerseys of Brazil or the red and white of Chile.

The match was played on a temporary grass field.

Early in the game, Brazilian defender David Luiz picked up and replaced a huge chunk of dislodged turf, and then stamped it down with his foot.

A few minutes later, two Brazilians could be seen replacing a chunk of turf. By halftime, an official ran onto the field during every stoppage to tamp down loose pieces.

It marked Brazil's first game in Canada in almost 20 years and the first in Toronto. The Brazilians last played in Canada in June 1994 at Edmonton, settling for a 1-1 draw against the Canada.