Joselu played for Stoke between 2015 and 2017 before two years at Newcastle
Real Madrid came from behind to beat Union Berlin and reach the Champions League last 16 with a 100% record.
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.
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.
Kral made it 2-2 with five minutes left to give the home fans hope, only for Ceballos to score the last goal of the game in the 89th minute.
Reigning European champions Manchester City have already qualified and will also advance with a 100% record if they win at Red Star Belgrade on Wednesday in Group G.
- Line-upsMatch StatsLive Text
Line-upsUnion Berlin
Formation 5-3-2
1Rønnow18Juranovic3Jaeckel31Knoche4Monteiro Pinto Leite26Roussillon19Haberer8Khedira6Gosens10Volland17Behrens
- 1Rønnow18JuranovicSubstituted forTrimmelat 82'minutes3JaeckelSubstituted forBeckerat 75'minutes31Knoche4Monteiro Pinto Leite26Roussillon19Haberer8KhediraBooked at 35minsSubstituted forKrálat 75'minutes6GosensSubstituted forLaïdouniat 75'minutesBooked at 76mins10VollandSubstituted forAaronsonat 82'minutes17Behrens
Substitutes
- 7Aaronson11Fofana20Laïdouni27Becker28Trimmel33Král37Schwolow38Dehl39Stein
Real Madrid
Formation 4-2-2-2
25Arrizabalaga Revuelta17Vázquez6Nacho4Alaba20García10Modric15Valverde19Ceballos5Bellingham14Joselu11Rodrygo
- 25Arrizabalaga Revuelta17Vázquez6Nacho4AlabaBooked at 55minsSubstituted forRüdigerat 71'minutes20García10Modric15ValverdeSubstituted forKroosat 45'minutes19CeballosSubstituted forPazat 90'minutes5BellinghamBooked at 35mins14Joselu11RodrygoSubstituted forDíazat 80'minutes
Substitutes
- 8Kroos13Lunin21Díaz22Rüdiger23Mendy28Martín31Cañizares32Paz33García36Tobias da Silva
Referee:Rade ObrenovicAttendance:73,420Match StatsHome TeamUnion BerlinAway TeamReal MadridPossessionHome26%Away74%ShotsHome8Away23Shots on TargetHome5Away9CornersHome3Away9FoulsHome10Away5Live Text Post update
Match ends, 1. FC Union Berlin 2, Real Madrid 3.
90'+6'Full Time
Second Half ends, 1. FC Union Berlin 2, Real Madrid 3.
90'+5'Post update
Corner, Real Madrid. Conceded by Robin Knoche.
90'+4'Post update
Antonio Rüdiger (Real Madrid) wins a free kick in the defensive half.
90'+4'Post update
Foul by Aïssa Laïdouni (1. FC Union Berlin).
90'+3'Post update
Lucas Vázquez (Real Madrid) wins a free kick on the right wing.
90'+3'Post update
Foul by Diogo Leite (1. FC Union Berlin).
90'+2'Post update
Attempt saved. Jérôme Roussillon (1. FC Union Berlin) left footed shot from outside the box is saved in the bottom left corner. Assisted by Sheraldo Becker.
90'+2'Post update
Corner, 1. FC Union Berlin. Conceded by Luka Modric.
90'+1'Post update
Fran García (Real Madrid) wins a free kick in the defensive half.
90'+1'Post update
Foul by Brenden Aaronson (1. FC Union Berlin).
90'Substitution
Substitution, Real Madrid. Nico Paz replaces Dani Ceballos.
89'goalGoal!
Goal! 1. FC Union Berlin 2, Real Madrid 3. Dani Ceballos (Real Madrid) right footed shot from the centre of the box to the bottom left corner. Assisted by Jude Bellingham.
88'Post update
Attempt saved. Toni Kroos (Real Madrid) left footed shot from outside the box is saved in the bottom left corner. Assisted by Jude Bellingham.
86'Post update
Foul by Jude Bellingham (Real Madrid).
86'Post update
Diogo Leite (1. FC Union Berlin) wins a free kick in the defensive half.
85'goalGoal!
Goal! 1. FC Union Berlin 2, Real Madrid 2. Alex Král (1. FC Union Berlin) right footed shot from outside the box to the bottom left corner. Assisted by Aïssa Laïdouni.
84'Post update
Foul by Brahim Díaz (Real Madrid).
84'Post update
Diogo Leite (1. FC Union Berlin) wins a free kick in the defensive half.
82'Substitution
Substitution, 1. FC Union Berlin. Brenden Aaronson replaces Kevin Volland.
Page 1 of 5rewindpreviousNavigate to the next pagenextNavigate to the last pageforward
Source: bbc.com