FC Porto sealed top spot in Champions League Group D as two quickfire second-half goals helped it overcome Schalke 3-1. 

Though both sides were certain of their places in the last 16 thanks to Galatasaray's earlier defeat at Lokomotiv Moscow, Porto knew that a victory would secure pole position with a game to spare.

And despite goalkeeper Ralf Fahrmann's best efforts, Porto took control when Eder Militao headed home his first goal for the club in the 52nd minute and Jesus Corona made it two three minutes later.

With the crossbar denying Felipe a fluke goal, Nabil Bentaleb's late penalty set up a grandstand finish, but Moussa Marega's stoppage-time strike wrapped up the win.

That moved Sergio Conceicao's men on to 13 points, their only misstep in five group-stage games coming in the opening 1-1 draw with Schalke.

Fahrmann shone in the reverse fixture on matchday one and was at his best to keep out Danilo Pereira's rasping 15th-minute shot.

Schalke had its captain to thank once more four minutes later, Marega's curling effort forcing Fahrmann into a wonderful diving save to his left.

Hector Herrera squandered a great chance moments after the restart, but Porto was not to be denied for much longer – Militao rising highest to plant in a powerful header from Oliver Torres' cross.

Fahrmann was beaten again three minutes later, Corona exchanging passes with Yacine Brahimi before slotting into the bottom-left corner with the help of a deflection.

Felipe's audacious overhead kick almost stole the show, only for the woodwork to come to Schalke's rescue.

Torres' handball handed Schalke a lifeline, but Bentaleb's coolly taken penalty proved a mere consolation, with Marega's fourth Champions League goal of the season making sure of the points.

What does it mean? Porto, Schalke can take it easy

There is nothing to play for now at the top of Group D, meaning that both coaches will have the luxury of resting their star players should they wish when matchday six rolls around. Porto faces a trip to Galatasaray, while Schalke hosts Lokomotiv on December 11.

Fahrmann proves a thorn in Porto's side

Fahrmann starred with a series of superb saves – including one from a penalty – in Schalke's 1-1 draw with Porto in September, and although it ultimately proved fruitless, the 30-year-old demonstrated his quality with a string of brilliant stops. Porto may well be glad to see the back of him.

Defensive collapse a concern for Tedesco

Although it relied on Fahrmann, Schalke's defensive solidity was certainly a factor in frustrating Porto in the first half, but as soon as Militao found the net, the visitor's resolve disappeared, and Domenico Tedesco must work to improve that if the Bundesliga side is to make the most of its chance in the knockout stages.

What's next?

Primeira Liga leader Porto will look for a fourth successive league win when it takes on struggling Boavista on Sunday, a day after Schalke travels to Hoffenheim in the Bundesliga.