MADRID (AP)Real Madrid converted two penalty kicks and saw goalkeeper Thibaut Courtois save another – all in the first half – as it comfortably defeated Celtic 5-1 to secure first place in its Champions League group on Wednesday.

Luka Modric converted a penalty in the sixth minute and Rodrygo another in the 21st, then Thibaut stopped one taken by Josip Juranovic in the 35th to leave Madrid in control at the Santiago Bernabeu Stadium.

Marco Asensio, with a shot from near the penalty spot after a pass by Dani Carvajal, added to the lead in the 51st. Vinicius Junior then netted the fourth after a cross by Federico Valverde in the 61st, and Valverde himself closed the scoring for the hosts with a shot from outside the area in the 71st.

Jota put Celtic on the board with a well-struck free kick that curled over the Madrid wall in the 84th.

With his goal from the spot, the 37-year-old Modric became the oldest player to convert a penalty in the Champions League, surpassing Lille’s Burak Yilmaz’s mark as a 36-year-old from earlier this year. It was Modric’s ninth goal in 111th Champions League appearances.

Madrid was coming off a 3-2 loss at Leipzig in the previous round – its first defeat of the season in all competitions – and needed the home victory against last-place Celtic to get the group win and a theoretically easier opponent in the next stage. The group-winners will be drawn against the second-place finishers in the round of 16.

Madrid finished Group F with 13 points, one more than Leipzig, which won at Shakhtar Donetsk in the other group match on Wednesday. Shakhtar ended third with six points, securing a spot in the Europa League playoffs.

Celtic earned its two points from 1-1 draws against Shakhtar. Madrid’s other setback in addition to the loss at Leipzig also was a draw at Shakhtar.

The victory on Wednesday ended a two-game winless streak for Madrid, which had been held by Girona at the Bernabeu in the Spanish league on Sunday.

Ballon d’Or winner Karim Benzema, who had missed three straight games because of muscle fatigue, came in as a substitute in the 63rd.

Celtic has never won in 21 competitive European games in Spain.

AP World Cup coverage: https://apnews.com/hub/world-cup and https://twitter.com/AP-Sports