Champions League: Real Madrid whistled off at the Bernebeu
Real Madrid 3 - 4 Schalke
Holders Real Madrid survived a real scare as they scraped into the quarter-finals 5-4 on aggregate despite a first home Champions League defeat since April 2011.
Schalke striker Klaas-Jan Huntelaar struck twice to end his former club's 21-match unbeaten run at the Bernabeu in the competition but the German side could not force the goal in the last six minutes which would have taken them into the quarter-finals.
Unhappy fans waved white handkerchiefs to show their displeasure at the end and the 4-3 loss took the gloss off another record-breaking night for Cristiano Ronaldo.
The Portugal star twice equalised with first-half headers with the second, moments before half-time, taking him level with Lionel Messi as the Champions League's joint-highest scorer with 75.
Messi will get the chance to respond against Manchester City next week but Ronaldo was at least able to claim one outright record himself as his second took him beyond former Real hero Raul to become the player with the most goals in all European competitions (78).
His double strike papered over the cracks of some shambolic defending from the reigning champions which had seen Christian Fuchs and then Huntelaar give the visitors a real chance of turning around a 2-0 deficit from the first leg.
However, Ronaldo's second and Karim Benzema's 20th of the season just after the interval appeared to have taken the game well beyond Schalke's reach.
But youngster Leroy Sane, on only his ninth senior appearance, pulled one back with over half-an-hour to go and Huntelaar set up a grandstand finish.
Real goalkeeper Iker Casillas certainly had Ronaldo to thank after slack handling errors contributed to Schalke twice taking the lead.
First he was beaten at his near post by Fuchs after 20 minutes despite getting a good hand on the shot and then, after Ronaldo had nodded in a Toni Kroos corner, he could only push Max Meyer's shot into the path of Huntelaar.
But Schalke were not exempt from poor defending and Ronaldo was inexplicably given a free run from the edge of the area to head in Fabio Coentrao's cross on the stroke of half-time for his 41st of the season.
Benzema's lateral run across the penalty area saw him slot the ball inside Timon Wellenreuther's left-hand post in the 53rd minute to make it 3-2 but Sane, a 19-year-old first-half substitute, took full advantage of Real's defence standing off to curl one home from the edge of the area.
Huntelaar's second, racing through to beat Casillas, set up a nervy final six minutes which they only just survived.
Meanwhile, Porto remained unbeaten in the Champions League this season and qualified for the quarter-finals for the first time since 2009 as they defeated Swiss side Basel 5-1 on aggregate.
Goals from Yacine Brahimi, Hector Herrera, Casemiro and Vincent Aboubakar, combined for a 4-0 win at the Estadio do Dragao, and continued Basel's poor form in Portugal as their coach Paulo Sousa endured a miserable return to his homeland.
The first leg had finished 1-1 three weeks ago in Switzerland.
Basel's former Argentina star Walter Samuel, who won the 2010 Champions League with Inter Milan, was sent off in the final minute for a second yellow card.