Real Madrid players celebrate their win over Union Berlin.
The hosts went ahead through Kevin Volland after goalkeeper Frederik Ronnow saved Luka Modric’s penalty.
A win would have taken the Germans into the Europa League play-offs, but former Stoke and Newcastle striker Joselu scored two headers to put Real ahead.
Alex Kral’s low shot made it 2-2, before Dani Ceballos finished from Jude Bellingham’s pass for the winning goal.
Fourteen-time European champions Real won all six of their Group C matches to end with 18 points, eight more than second-placed Napoli who beat Braga 2-0.
Â
Stay up to date with the latest news. Follow Daily Times on instagram Channels.
Â
This was Union Berlin’s first campaign in the Champions League, but they finished bottom of the group with only two points to end their European involvement.
Real were awarded a 45th-minute penalty because of Diogo Leite’s handball but Ronnow saved Modric’s spot-kick, with the hosts going ahead shortly afterwards.
But they could not hang on as Joselu finished from crosses from Rodrygo and Fran Garcia to score twice in an 11-minute spell.
