MADRID (AP) — Real Madrid secured first place in its Champions League group with a 2-0 win over Inter Milan on Tuesday, with both teams having already guaranteed their places in the knockout stage.

Toni Kroos and Marco Asensio scored a goal in each half for Madrid, which needed at least a draw against the Italian team to win Group D. It finished with 15 points, five more than Inter. Sheriff and Shakhtar Donetsk had already been eliminated.

It was the ninth straight win for Carlo Ancelotti’s team in all competitions, and its unbeaten streak reached 12 consecutive matches.

“I’m extremely happy with the game and the result,” Madrid midfielder Luka Modric said. “We wanted first place to avoid stronger teams. It’s better. It’s what we wanted. From now on you have to win everything if you want to lift the trophy in the end.”

Inter threated early at the Santiago Bernabéu Stadium, but it was Madrid midfielder Kroos who opened the scoring with a low left-footed strike from outside the area in the 17th minute.

The hosts nearly added to the lead when forward Rodrygo hit the post from inside the area just before halftime, and Asensio sealed the victory with a shot from outside the box in the 79th.

Inter went a man down in the 64th as midfielder Nicolo Barella was sent off after punching the leg of Madrid defender Éder Militão after going to the ground as both went for the ball. The red card came after a video review.

Madrid will be playing in the knockout stage for the 25th straight time. The 13-time European champion has played in the knockout rounds every season since 1997-98. It will be the 19th consecutive time Madrid will play in the last 16, since that round was introduced in 2003-04.

Madrid was eliminated by eventual champion Chelsea in last season’s semifinals.

Inter, the last Italian club to win the Champions League in a final in Madrid in 2010, has won only six of its last 22 Champions League matches, with nine losses and seven draws.

Inter’s lone away win against Madrid came in 1967. It has lost four straight against the Spanish powerhouse.

Modric made his 100th Champions League appearance, becoming the 10th Madrid player to reach the milestone.

Madrid’s top scorer this season, Karim Benzema, did not play.

___