BRUGES, Belgium — Real Madrid capped its Champions League group campaign with a comfortable 3-1 win at Club Brugge on Wednesday.

Madrid had already qualified for the knockout round in second place in Group A and was pegged back during the first 20 minutes. The Spanish giant then gradually took control with second-half goals from Rodrygo, Vinicius Junior and Luka Modric.

Despite the result, Brugge kept hold of a Europa League spot by finishing third ahead of Galatasaray, which lost 5-0 to group winner Paris Saint-Germain.

Brugge got off a strong start and dominated with a good combination of high pressure and speed during an entertaining first half.

But after Percy Tau saw his effort from close range stopped by Madrid goalkeeper Alphonse Areola, the home side lacked a cutting edge under heavy rain at the Jan Breydelstadion.

Madrid was dangerous on the counter and had the first half’s best opportunities. Set up in the area by Vinicius Junior, Luka Jovic tried his luck from a tight angle in the 16th minute but saw his effort tipped over by goalkeeper Simon Mignolet. Francisco “Isco’’ Alarcon came close after the half-hour mark with a low shot from the edge of the box that ended inches wide.

Madrid improved after the interval and Brazilian forward Rodrygo volleyed the hosts in front in the 53rd minute with the outside of his left foot. Brugge hit back immediately as Hans Vanaken levelled in the next minute with a curled finish.

The visitors patiently waited for an opening and restored their advantage at the end of a collective move started by Isco and concluded by Vinicius from close range after the ball was deflected into his path in the 64th.

Madrid was in control afterward and Modric added more lustre to the win with a curled shot past Mignolet in stoppage time.

___

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