AVEIRO, Portugal — It didn't take long for Cristiano Ronaldo to give Portugal the boost it needed in European qualifying for the 2018 World Cup.

Ronaldo scored twice in the first four minutes, then added two others in the second half, to help the European champion rout nine-man Andorra 6-0 on Friday and earn its first win in qualifying.

"We knew the first goal was important because they play with 11 men behind the ball," Ronaldo said. "We got off to a good start."

Ronaldo did not play in the 2-0 loss to Switzerland in the Group B opener in September because he was still recovering from a knee injury sustained in the final of Euro 2016.

It was the first time he scored four goals in the same game with the national team.

The Swiss scored a late winner in a 3-2 to win at Hungary to win their second in a row and take the group lead with six points, two more than the surprising Faeroe Islands, which followed its draw at Hungary with a 2-0 victory over Latvia.

Portugal and Latvia have three points each, with Andorra staying with zero.

Only the group winners automatically qualify.

PORTUGAL 6, ANDORRA 0

Ronaldo made his presence felt early in the western city of Aveiro, scoring with a left-footed shot from inside the area in the second minute and adding to the lead with a header in the fourth. His third came with a one-timer from close range, and the fourth with another left-footer.

He also caused both red cards to Andorra players. Jordi Rubio was sent off for a second yellow card for a hard foul on the Portuguese star in the 62nd, and Marc Rebes was shown a straight red for another vicious foul on Ronaldo in the 70th.

Joao Cancelo netted for Portugal just before halftime, and Andre Silva closed the scoring in the 86th.

Andorra goalkeeper Josep Gomes made great saves to help Andorra avoid a bigger defeat.

"Now we have to think about the Faeroe Islands," Portugal coach Fernando Santos said. "We need to win it."

HUNGARY 2, SWITZERLAND 3

Switzerland twice relinquished leads but held on after Valentin Stocker's 89th-minute goal in Budapest, securing the group lead.

Haris Seferovic opened the scoring for the Swiss in the 51st, but the hosts equalized with Adam Szalai just two minutes later. Ricardo Rodriguez put Switzerland ahead again in the 67th, and Hungary evened the match one more time four minutes later.

Hungary had been held by the Faeroe Islands to a scoreless draw in their opener, while Switzerland beat Portugal.

LATVIA 0, FAEROE ISLANDS 2

The Faeroe Islands followed its surprise draw against Hungary with a win at Latvia behind goals by Sonni Nattestad in the first half and Joan Edmundsson in the second.

The two stunning results have the team from the small group of islands in the north Atlantic only two points from the group lead.

Latvia opened with a 1-0 win at Andorra.