Ghana’s Abdul Baba Rahman was an unused substitute as Porto defeated Schalke 3-1 on Wednesday to guarantee first place in Group D of the Champions League.

Militao scored his first goal since joining Porto in the summer with a header in the 52nd minute and Corona added to the lead with a shot from inside the area in the 55th.

Schalke, which struggled to get near the goal of Porto goalkeeper Iker Casillas, scored with an 89th-minute penalty converted by Bentaleb after a handball by Porto’s Oliver Torres.

The German team tried to press for the equalizer but Marega restored a two-goal lead from inside the box deep into injury time, not long after he had a goal disallowed for offside.

Both teams had already advanced to the knockout stage, but first place was still up for grabs. The victory kept Porto unbeaten and gave the team a five-point gap to Schalke ahead of the final round of matches in December.