Eric Maxim Choupo-Moting's 93rd-minute penalty earned Roberto Di Matteo's Schalke an incredible 4-3 win over Sporting Lisbon.
Choupo-Moting was the beneficiary of a questionable decision from referee Sergey Karasev, who felt Jonathan Silva handled the ball in his penalty area.
And the Cameroon forward held his nerve, slotting home the stoppage time spot-kick to give Schalke all three points in an incredible UEFA Champions League match on Tuesday.
Sporting took a 16th-minute lead through Nani, but Patricio's second yellow card - given 17 minutes later after he barged into Marco Hoger - swung the match in Schalke's favour.
Chinedu Obasi first levelled proceedings, and further goals from Klaas-Jan Huntelaar and Benedikt Howedes after the break gave Schalke a seemingly unassailable 3-1 lead.
Adrien Silva had other ideas, though, first scoring a penalty before he headed in a 78th-minute equaliser for the 10 men from Portugal.
But just when Di Matteo - who saw his side beat Hertha Berlin 2-0 on Saturday in his first match in charge - was contemplating how his side snatched a draw from the jaws of victory, Choupo-Moting stepped up, giving Schalke their first Group G triumph of the campaign.
The result marked a successful return to the Champions League for Di Matteo, who led Chelsea to glory in Europe's premier club competition in 2012, only to be sacked later that year.
Sporting - buoyed by a 3-1 Taca de Portugal win over Porto on Saturday - started brightly, with Nani and Islam Slimani having early efforts on goal.
The hosts, meanwhile, were lacklustre and could have few complaints when Sporting took the early lead.
Joao Mario's corner - rolled along the ground towards the top of the penalty area - caught Schalke napping and Nani pounced, sending a deflected 15-yard effort beyond Ralf Fahrmann.
Julian Draxler almost produced an immediate response, volleying just wide at the back post, while Slimani's night ended early when he limped off clutching an apparent hamstring injury - Fredy Montero replacing him in the 25th minute.
Mauricio's red card swung the match in Schalke's favour, though, and they levelled proceedings from the resultant free-kick.
Dennis Aogo's free-kick was nodded towards goal by Obasi from 10 yards and, despite getting two hands to it, Sporting goalkeeper Rui Patricio could not keep it out.
Schalke took the lead five minutes into the second half, when from a quick break, Draxler burst down the left and found Obasi, who slipped a neat pass through to Huntelaar.
And the Netherlands man made no mistake, holding his nerve to slot into the bottom-left corner from 12 yards.
Obasi shot just wide four minutes later but Schalke did not wait long to extend their lead - Howedes heading Kaan Ayhan's free-kick in on the hour mark.
Sporting kept themselves in the contest when Ayhan brought Andre Carrillo down in the box, Adrien Silva coolly dispatching the resultant penalty.
And the goalscorer was not done yet, heading in Cedric's excellent cross with 12 minutes left to set up a grandstand finish.
Schalke surged forward in search of a fourth goal, but looked like they may have to settle for a draw until Karasev pointed to the spot, as Choupo-Moting saved the day for his new coach.