Spain finished its qualifying campaign for the 2020 European Championship with a 5-0 rout of Romania on Monday, with the first four goals coming in the first half.

Gerard Moreno scored twice for the hosts, who had already secured a spot in the tournament but needed the victory to be among the top-seeded teams in the draw this month.

More Images
Spain's Gerard Moreno celebrates after scoring his side's second goal during the Euro 2020 group F qualifying soccer match between Spain and Romania at the Metropolitano stadium in Madrid, Monday, Nov. 18, 2019. (AP PhotoManu Fernandez)

Spain finished its qualifying campaign for the 2020 European Championship with a 5-0 rout of Romania on Monday, with the first four goals coming in the first half.

Spain's Gerard Moreno celebrates after scoring his side's second goal during the Euro 2020 group F qualifying soccer match between Spain and Romania at the Metropolitano stadium in Madrid, Monday, Nov. 18, 2019. (AP PhotoManu Fernandez)

“It was important to finish with the three points in front of our crowd,” said Ruiz, who scored his first goal with the national team. “We need to keep this same dynamic going into the Euros next year.”

Spain's Gerard Moreno celebrates after scoring his side's second goal during the Euro 2020 group F qualifying soccer match between Spain and Romania at the Metropolitano stadium in Madrid, Monday, Nov. 18, 2019. (AP PhotoManu Fernandez)

Spain, coming off routing Malta 7-0 in Cádiz, outscored its opponents 31-5.

Spain's Saul Niguez jumps for the ball during the Euro 2020 group F qualifying soccer match between Spain and Romania at the Metropolitano stadium in Madrid, Monday, Nov. 18, 2019. (AP PhotoManu Fernandez)

Rus found his own net while trying to intercept a cross into the area in first-half stoppage time, and Oyarzabal closed the scoring with a left-footed shot from outside the box in second-half injury time.

Spain's Gerard Moreno, 2nd left, scores his side's second goal during the Euro 2020 group F qualifying soccer match between Spain and Romania at the Metropolitano stadium in Madrid, Monday, Nov. 18, 2019. (AP PhotoManu Fernandez)

Tales Azzoni on Twitter: http://twitter.com/tazzoni

Spain's Saul Niguez, right, tackles Romania's Florinel Coman during the Euro 2020 group F qualifying soccer match between Spain and Romania at the Metropolitano stadium in Madrid, Monday, Nov. 18, 2019. (AP PhotoManu Fernandez)

Spain's Saul Niguez, right, tackles Romania's Florinel Coman during the Euro 2020 group F qualifying soccer match between Spain and Romania at the Metropolitano stadium in Madrid, Monday, Nov. 18, 2019. (AP PhotoManu Fernandez)

Spain's Sergio Ramos stands on the pitch during the national anthems before the Euro 2020 group F qualifying soccer match between Spain and Romania at the Metropolitano stadium in Madrid, Monday, Nov. 18, 2019. (AP PhotoManu Fernandez)

Spain's Sergio Ramos stands on the pitch during the national anthems before the Euro 2020 group F qualifying soccer match between Spain and Romania at the Metropolitano stadium in Madrid, Monday, Nov. 18, 2019. (AP PhotoManu Fernandez)

Spain also got on the scoreboard through Fabián Ruiz, Mikel Oyarzabal, and an own-goal by Romanian defender Adrián Rus.

Spain's Gerard Moreno celebrates after scoring his side's second goal during the Euro 2020 group F qualifying soccer match between Spain and Romania at the Metropolitano stadium in Madrid, Monday, Nov. 18, 2019. (AP PhotoManu Fernandez)

Spain's Gerard Moreno celebrates after scoring his side's second goal during the Euro 2020 group F qualifying soccer match between Spain and Romania at the Metropolitano stadium in Madrid, Monday, Nov. 18, 2019. (AP PhotoManu Fernandez)

“It was important to finish with the three points in front of our crowd,” said Ruiz, who scored his first goal with the national team. “We need to keep this same dynamic going into the Euros next year.”

Spain ended as the Group F winner with eight wins and two draws, at Norway and Sweden. “La Roja” finished five points in front of second-placed Sweden.

Romania, which had already been eliminated, ended in fourth place with four victories and two draws in 10 matches.

Spain's Gerard Moreno celebrates after scoring his side's second goal during the Euro 2020 group F qualifying soccer match between Spain and Romania at the Metropolitano stadium in Madrid, Monday, Nov. 18, 2019. (AP PhotoManu Fernandez)

Spain's Gerard Moreno celebrates after scoring his side's second goal during the Euro 2020 group F qualifying soccer match between Spain and Romania at the Metropolitano stadium in Madrid, Monday, Nov. 18, 2019. (AP PhotoManu Fernandez)

Spain, coming off routing Malta 7-0 in Cádiz, outscored its opponents 31-5.

It was in control from the start on Monday, with Romania threatening only a few times in front of a crowd of 36,198 at Wanda Metropolitano Stadium, including many Romanians.

Ruiz opened the scoring from close range in the eighth minute, and Moreno added his goals with a header in the 33rd and strike from the six-yard line in the 43rd.

Spain's Gerard Moreno celebrates after scoring his side's second goal during the Euro 2020 group F qualifying soccer match between Spain and Romania at the Metropolitano stadium in Madrid, Monday, Nov. 18, 2019. (AP PhotoManu Fernandez)

Spain's Gerard Moreno celebrates after scoring his side's second goal during the Euro 2020 group F qualifying soccer match between Spain and Romania at the Metropolitano stadium in Madrid, Monday, Nov. 18, 2019. (AP PhotoManu Fernandez)

Rus found his own net while trying to intercept a cross into the area in first-half stoppage time, and Oyarzabal closed the scoring with a left-footed shot from outside the box in second-half injury time.

It was the second Spain match at Atlético’s Metropolitano stadium, the other a 6-1 rout of Argentina ahead of last year’s World Cup.

More AP soccer https://apnews.com/Soccer and https://twitter.com/AP_Sports

Spain's Saul Niguez jumps for the ball during the Euro 2020 group F qualifying soccer match between Spain and Romania at the Metropolitano stadium in Madrid, Monday, Nov. 18, 2019. (AP PhotoManu Fernandez)

Spain's Saul Niguez jumps for the ball during the Euro 2020 group F qualifying soccer match between Spain and Romania at the Metropolitano stadium in Madrid, Monday, Nov. 18, 2019. (AP PhotoManu Fernandez)

Tales Azzoni on Twitter: http://twitter.com/tazzoni

Spain's Gerard Moreno, 2nd left, scores his side's second goal during the Euro 2020 group F qualifying soccer match between Spain and Romania at the Metropolitano stadium in Madrid, Monday, Nov. 18, 2019. (AP PhotoManu Fernandez)

Spain's Gerard Moreno, 2nd left, scores his side's second goal during the Euro 2020 group F qualifying soccer match between Spain and Romania at the Metropolitano stadium in Madrid, Monday, Nov. 18, 2019. (AP PhotoManu Fernandez)

Spain's Saul Niguez, right, tackles Romania's Florinel Coman during the Euro 2020 group F qualifying soccer match between Spain and Romania at the Metropolitano stadium in Madrid, Monday, Nov. 18, 2019. (AP PhotoManu Fernandez)

Spain's Saul Niguez, right, tackles Romania's Florinel Coman during the Euro 2020 group F qualifying soccer match between Spain and Romania at the Metropolitano stadium in Madrid, Monday, Nov. 18, 2019. (AP PhotoManu Fernandez)

Spain's Sergio Ramos stands on the pitch during the national anthems before the Euro 2020 group F qualifying soccer match between Spain and Romania at the Metropolitano stadium in Madrid, Monday, Nov. 18, 2019. (AP PhotoManu Fernandez)

Spain's Sergio Ramos stands on the pitch during the national anthems before the Euro 2020 group F qualifying soccer match between Spain and Romania at the Metropolitano stadium in Madrid, Monday, Nov. 18, 2019. (AP PhotoManu Fernandez)