Holder Barcelona was drawn Friday to play Real Sociedad in the quarterfinals of the King's Cup while Celta Vigo will take on Real Madrid. La Liga leader Real booked its spot in the last eight Thursday when it set a Spanish record of 40 matches unbeaten in all competitions after it came back from two goals behind to snatch a 3-3 draw at Sevilla. Atletico Madrid will take on Eibar, which is in the quarterfinals for the first time, while second tier side Alcorcon, the only team from outside the top flight left in the competition, faces Alaves. The ties will be played over two legs with the opening matches on Jan. 18 and the return encounters a week later. The final will take place on May 27. Real claims unbeaten record Real Madrid set a Spanish record of 40 matches unbeaten in all competitions after it came back from two goals behind to snatch a 3-3 draw at Sevilla with a last-gasp equalizer from Karim Benzema in the King's Cup Thursday. Real trailed 3-1 in the 77th minute of its last-16 second leg tie but captain Sergio Ramos reduced the arrears from the penalty spot in the 83rd minute after Matias Kranevitter had pulled down Casemiro in the area. With seconds remaining, Marcelo fed Benzema in the area and the Frenchman struck a right-footed shot past Sevilla goalkeeper David Soria as Real progressed to the quarterfinals with a 6-3 aggregate win. Sevilla took the lead when Danilo headed a cross from Pablo Sarabia into his own net in the 10th minute, but Marco Asensio equalized with a low near-post shot following a terrific run from midfield three minutes after the re-start. Stevan Jovetic, who joined Sevilla on loan from Inter Milan this week, volleyed home right-footed eight minutes after coming on to put the hosts in front in the 54th minute before Vicente Iborra pounced on a loose ball to add a third. Real looked to be heading for its first defeat since it lost to VfL Wolfsburg last April, but Ramos clawed his team back into the contest with a Panenka-style dinked penalty into the middle of the goal before substitute Benzema completed the comeback. Real had equalled archrival Barcelona's long unbeaten run with a 5-0 rout of Granada Saturday. Real, four points clear of Sevilla at the top of La Liga, face it again at the same venue Sunday. Elsewhere, Valencia remained winless this year after failing to reverse a 4-1 home loss to Celta Vigo, being eliminated 6-2 on aggregate. Eibar comfortably held its 3-0 first-leg win, advancing after a lackluster home draw against the last-place team in the Spanish league Osasuna. Milan sets up Juve quarter Juraj Kucka and Giacomo Bonaventura struck in four second-half minutes to fire AC Milan to a thrilling 2-1 Italian Cup win over Torino and a quarterfinal tie with Juventus Thursday. It means one of this season's Cup quarters will be a repeat of the 2015 Cup final, when Juventus beat Milan on its way to a second successive league and Cup double. Milan, which recently beat Juventus in Doha to claim the Italian Super Cup, won its home league fixture with the Serie A champion earlier this season. - Agencies