Cristiano Ronaldo scored his 700th career goal but couldn't keep Portugal from losing 2-1 to Ukraine in qualifying for the 2020 European Championship on Monday.

Ukraine qualified for Euro 2020 with the victory, its sixth in seven matches in Group B. Portugal remains in second place and will need to keep battling for its spot in the remaining rounds.

More Images
Portugal's Cristiano Ronaldo gestures during the Euro 2020 group B qualifying soccer match between Ukraine and Portugal at the Olympiyskiy stadium in Kyiv, Ukraine, Monday, Oct. 14, 2019. (AP PhotoEfrem Lukatsky)

Cristiano Ronaldo scored his 700th career goal but couldn't keep Portugal from losing 2-1 to Ukraine in qualifying for the 2020 European Championship on Monday.

Ukraine's players celebrate their side's opening goal during the Euro 2020 group B qualifying soccer match between Ukraine and Portugal at the Olympiyskiy stadium in Kyiv, Ukraine, Monday, Oct. 14, 2019. (AP PhotoEfrem Lukatsky)

Ronaldo has also scored 450 goals for Real Madrid, 118 for Manchester United, 32 for his current club Juventus, and five for Sporting.

Ukraine's Roman Yaremchuk, left, scores his side's opening goal past Portugal's goalkeeper Rui Patricio during the Euro 2020 group B qualifying soccer match between Ukraine and Portugal at the Olympiyskiy stadium in Kyiv, Ukraine, Monday, Oct. 14, 2019. (AP PhotoEfrem Lukatsky)

Ukraine would have qualified even with a draw.

Portugal's Cristiano Ronaldo, above, tries to score past Ukraine's goalkeeper Andriy Pyatov, left, during the Euro 2020 group B qualifying soccer match between Ukraine and Portugal at the Olympiyskiy stadium in Kyiv, Ukraine, Monday, Oct. 14, 2019. (AP PhotoEfrem Lukatsky)

Ukraine and Portugal had drawn 0-0 in their group opener in Portugal.

Portugal's Cristiano Ronaldo gestures during the Euro 2020 group B qualifying soccer match between Ukraine and Portugal at the Olympiyskiy stadium in Kyiv, Ukraine, Monday, Oct. 14, 2019. (AP PhotoEfrem Lukatsky)

Portugal's Cristiano Ronaldo gestures during the Euro 2020 group B qualifying soccer match between Ukraine and Portugal at the Olympiyskiy stadium in Kyiv, Ukraine, Monday, Oct. 14, 2019. (AP PhotoEfrem Lukatsky)

Portugal's Cristiano Ronaldo, right, fights for the ball with Ukraine's Oleksandr Karavaev during the Euro 2020 group B qualifying soccer match between Ukraine and Portugal at the Olympiyskiy stadium in Kyiv, Ukraine, Monday, Oct. 14, 2019. (AP PhotoEfrem Lukatsky)

Portugal's Cristiano Ronaldo, right, fights for the ball with Ukraine's Oleksandr Karavaev during the Euro 2020 group B qualifying soccer match between Ukraine and Portugal at the Olympiyskiy stadium in Kyiv, Ukraine, Monday, Oct. 14, 2019. (AP PhotoEfrem Lukatsky)

Ukraine's goalkeeper Andriy Pyatov, left, catches the ball after struggling with Portugal's Cristiano Ronaldo, centre, during the Euro 2020 group B qualifying soccer match between Ukraine and Portugal at the Olympiyskiy stadium in Kyiv, Ukraine, Monday, Oct. 14, 2019. (AP PhotoEfrem Lukatsky)

Ukraine's goalkeeper Andriy Pyatov, left, catches the ball after struggling with Portugal's Cristiano Ronaldo, centre, during the Euro 2020 group B qualifying soccer match between Ukraine and Portugal at the Olympiyskiy stadium in Kyiv, Ukraine, Monday, Oct. 14, 2019. (AP PhotoEfrem Lukatsky)

Ronaldo netted his milestone goal for club and country by converting a penalty kick in the 72nd minute, when the defending European champions already trailed by two goals. It was the seventh goal in six qualifying matches for Ronaldo, and his 95th overall with Portugal.

Portugal's Cristiano Ronaldo gestures during the Euro 2020 group B qualifying soccer match between Ukraine and Portugal at the Olympiyskiy stadium in Kyiv, Ukraine, Monday, Oct. 14, 2019. (AP PhotoEfrem Lukatsky)

Portugal's Cristiano Ronaldo gestures during the Euro 2020 group B qualifying soccer match between Ukraine and Portugal at the Olympiyskiy stadium in Kyiv, Ukraine, Monday, Oct. 14, 2019. (AP PhotoEfrem Lukatsky)

Ronaldo has also scored 450 goals for Real Madrid, 118 for Manchester United, 32 for his current club Juventus, and five for Sporting.

Roman Yaremchuk had put Ukraine ahead less than 10 minutes into the match, and Andriy Yarmolenko added to the lead near the half-hour mark. Ukraine played with 10 men after defender Taras Stepanenko was sent off with a second yellow card for the handball that led to the penalty converted by Ronaldo.

Portugal kept pressing until the end but couldn't find the equalizer. Ronaldo had a few good chances, and Danilo came close with a long-range shot that struck the crossbar in stoppage time.

Ukraine's players celebrate their side's opening goal during the Euro 2020 group B qualifying soccer match between Ukraine and Portugal at the Olympiyskiy stadium in Kyiv, Ukraine, Monday, Oct. 14, 2019. (AP PhotoEfrem Lukatsky)

Ukraine's players celebrate their side's opening goal during the Euro 2020 group B qualifying soccer match between Ukraine and Portugal at the Olympiyskiy stadium in Kyiv, Ukraine, Monday, Oct. 14, 2019. (AP PhotoEfrem Lukatsky)

Ukraine would have qualified even with a draw.

Ukraine reached 19 points, eight more than Portugal and nine more than third-place Serbia, which won 2-1 at Lithuania.

Portugal has two qualifying matches left — against Lithuania and at Luxembourg.

Ukraine's Roman Yaremchuk, left, scores his side's opening goal past Portugal's goalkeeper Rui Patricio during the Euro 2020 group B qualifying soccer match between Ukraine and Portugal at the Olympiyskiy stadium in Kyiv, Ukraine, Monday, Oct. 14, 2019. (AP PhotoEfrem Lukatsky)

Ukraine's Roman Yaremchuk, left, scores his side's opening goal past Portugal's goalkeeper Rui Patricio during the Euro 2020 group B qualifying soccer match between Ukraine and Portugal at the Olympiyskiy stadium in Kyiv, Ukraine, Monday, Oct. 14, 2019. (AP PhotoEfrem Lukatsky)

Ukraine and Portugal had drawn 0-0 in their group opener in Portugal.

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

Portugal's Cristiano Ronaldo, above, tries to score past Ukraine's goalkeeper Andriy Pyatov, left, during the Euro 2020 group B qualifying soccer match between Ukraine and Portugal at the Olympiyskiy stadium in Kyiv, Ukraine, Monday, Oct. 14, 2019. (AP PhotoEfrem Lukatsky)

Portugal's Cristiano Ronaldo, above, tries to score past Ukraine's goalkeeper Andriy Pyatov, left, during the Euro 2020 group B qualifying soccer match between Ukraine and Portugal at the Olympiyskiy stadium in Kyiv, Ukraine, Monday, Oct. 14, 2019. (AP PhotoEfrem Lukatsky)

Portugal's Cristiano Ronaldo gestures during the Euro 2020 group B qualifying soccer match between Ukraine and Portugal at the Olympiyskiy stadium in Kyiv, Ukraine, Monday, Oct. 14, 2019. (AP PhotoEfrem Lukatsky)

Portugal's Cristiano Ronaldo gestures during the Euro 2020 group B qualifying soccer match between Ukraine and Portugal at the Olympiyskiy stadium in Kyiv, Ukraine, Monday, Oct. 14, 2019. (AP PhotoEfrem Lukatsky)

Portugal's Cristiano Ronaldo, right, fights for the ball with Ukraine's Oleksandr Karavaev during the Euro 2020 group B qualifying soccer match between Ukraine and Portugal at the Olympiyskiy stadium in Kyiv, Ukraine, Monday, Oct. 14, 2019. (AP PhotoEfrem Lukatsky)

Portugal's Cristiano Ronaldo, right, fights for the ball with Ukraine's Oleksandr Karavaev during the Euro 2020 group B qualifying soccer match between Ukraine and Portugal at the Olympiyskiy stadium in Kyiv, Ukraine, Monday, Oct. 14, 2019. (AP PhotoEfrem Lukatsky)

Ukraine's goalkeeper Andriy Pyatov, left, catches the ball after struggling with Portugal's Cristiano Ronaldo, centre, during the Euro 2020 group B qualifying soccer match between Ukraine and Portugal at the Olympiyskiy stadium in Kyiv, Ukraine, Monday, Oct. 14, 2019. (AP PhotoEfrem Lukatsky)

Ukraine's goalkeeper Andriy Pyatov, left, catches the ball after struggling with Portugal's Cristiano Ronaldo, centre, during the Euro 2020 group B qualifying soccer match between Ukraine and Portugal at the Olympiyskiy stadium in Kyiv, Ukraine, Monday, Oct. 14, 2019. (AP PhotoEfrem Lukatsky)