Real Madrid's youngsters were knocked out of the UEFA Youth League on penalties against Porto in a controversial last-16 match at Valdebebas on Tuesday night. Madrid had to play much of the second half with ten men after Dani Fernandez saw red for a second bookable offence and the hosts were forced to reflect on a contrversial penalty that pegged them back after taking the lead. Borja Mayoral had fired the hosts ahead in the second half with his seventh goal in as many matches in this season's competition and Madrid were looking good to progress to a date with either Anderlecht or Barcelona in the last eight. But the Portuguese visitors forced penalties with a leveller ten minutes from time through a Leonardo penalty. The Porto striker had missed a spot-kick a minute before but had a second chance when the referee pointed to the spot as substitute Molina handled the ball after thinking it had gone out of play. With no extra-time the match went straight to penalties and it was the visitors who held their nerve to win 3-1 and progress to the next round. Madrid had fallen short against Portuguese opposition last season when they lost 4-0 against Benfica in the semi-finals in Nyon and it was opponents from across the border that cut them short again. Madrid topped Group B with four wins from six, including a 6-0 victory over Ludogorets last time out, to progress to the knockout stages and secure home advantage. Porto did not enjoy such a comfortable passage, making it to Valdebebas by the skin of their teeth thanks to a stoppage-time penalty in a 1-1 draw against Shakhtar Donetsk. That form carried into the opening exchanges at a windy Alfredo Di Stéfano stadium as Luis Miguel Ramis’s side bossed the first 20 minutes. Borja Mayoral, who went into the game with six goals from as many games in the competition, was thwarted by Porto goalkeeper Gudino inside six minutes and Lazo saw a powerful shot parried just a minute later as the traffic was one way. Mardrid’s top scorer came close to pouncing when Gudino spilled a dangerous low cross but the visiting stopper scrambled the ball to safety and then did well to save a curling long-range shot from Cristian Cedres just after the half-hour mark. The Portuguese side started to edge their way into proceedings midway through the half but Madrid goalkeeper David Oliveros did not have the busiest 45 minutes. The closest Porto came to testing the home stopper was when captain Rui Moreira’s in-swinging free-kick was headed to safety to by Dorian Babunski. The hosts finished the half back in the ascendancy but could not find the breakthrough as full-back Luismi Quezada lashed one shot wide of the far post before Cedres fired another effort into the side netting from long-range. The pendulum swung the visitors’ way on the restart when Madrid were reduced to ten men five minutes into the second half. Dani Fernandez was handed a second yellow card and the hosts adjusted by sacrificing forward Babunski for defender Alvaro Tejero. Porto thought they had taken advantage of their extra man just minutes later but Leonardo’s strike was ruled out for offside after he beat Oliveros at the second time of asking. Just as the visitors were starting to grab a hold of proceedings, however, Madrid hit them with a sucker-punch. Mayoral had lost his strike partner but he had not lost his appetite to fire his side into the quarter-finals and his clinical finish gave the hosts the lead on the hour mark. The game evened out as ten-man Madrid looked to hang on to their advantage but Lumor fired a warning sign that the visitors were still in the contest and Leonardo came inches away from connecting to a Sergio Ribeiro cross. The turning point came with little over ten minutes to go when Porto were awarded two penalties in controversial fashion. There were no complaints about the first as Quezada tripped Ribeiro inside the box but the Madrid full-back had Oliveros to thank as he pushed away Leonardo’s spot-kick to keep his side’s lead in tact. That lasted just a minute, however, as the referee pointed to the spot again to give the visitors second bite of the cherry. Madrid were not happy with Molina picking the ball up after thinking it had gone out of play but Porto’s No.9 did not look a gift horse in the mouth and he made no mistake the second time to level things up. The match needed penalties and while Porto held their nerve, Cedres, Febas and Lienhart all missed their spot-kicks to see the visitors win 3-1 and progress to the quarter-finals. Madrid: Oliveros, Luismi, Lienhart, Kuscevic, Borja (Molina 68), Mayoral, Lazo (Garcia 79), Dani, Febas, Babunski (c) (Tejero 52), Cristian Cedres. Subs: Tejero, Molina, Ayala, Garcia, Harper, Marcos, Mario Rodriguez. Porto: Gudino, Fernando, Malthe, Verdasca (Djim 79), Lumor, Chidozie, Sergio Ribeiro, Clever (Moreto 46), Leonardo, Rui Moreira (c)(Cardoso 67), Ruben Macedo. Subs: Joao Costa, Rui Silva, Jorge, Moreto, Joao Cardoso, Bruno Costa, Tony Djim.