( CNN ) -- One of sport 's greatest rivalries will be reignited Thursday when Roger Federer and Rafael Nadal go head-to-head in the quarterfinals of the Indian Wells Masters . Seventeen-time grand slam champion Federer and Nadal , a winner of 11 majors , have n't played each other since the semifinals of the 2012 edition of the Miami event , when Federer emerged with a straight-sets win . Switzerland 's Federer booked his place in the last eight with a 6-3 6-7 ( 7-4 ) 7-5 victory over compatriot and former doubles partner Stanislaw Wawrinka , while Spain 's Nadal came from behind to beat Latvian Ernests Gulbis 4-6 6-4 7-5 . World No . 5 Nadal has the edge over second seed Federer , leading the head-to-head record with 18 wins to Ferderer 's 10 . Nadal has also emerged victorious from six of the eight grand slam finals the pair have contested . For former world No.1 Nadal , the win over Gulbis represented another step forward in his comeback from a knee injury which sidelined him for seven months . `` To win matches in days like today are more important that ever for me , and I 'm very happy about what I did on court , '' the 26-year-old told the ATP World Tour 's official website . `` I 'm happy about the attitude . With all the problems , I was able to keep being focused and keep winning . '' Defending champion Federer is bidding for a record fifth Indian Wells triumph . `` Today it was extremely close again , '' said the 31-year-old . `` OK , I should [ have ] maybe closed it out in the second set , but he did well to stay in it . `` At the end , I do n't know what [ got ] me through . Maybe it 's the experience or maybe [ I was ] a bit more calm in those moments . I 'm not sure . Today I think I was a little lucky to come through it in the end . '' Top seed Novak Djokovic extended his unbeaten start to 2013 , stretching his winning streak to 16 by defeating American Sam Querrey 6-0 7-6 ( 8-6 ) in a match which finished at 1:51 am local time . Despite the defeat , Querrey is certain to usurp John Isner as the U.S. 's top-ranked male tennis player . Next up for six-time grand slam champion Djokovic is France 's Jo-Wilfried Tsonga , who came from one set down to beat Canadian Milos Raonic . Third seed Andy Murray , who lost to Djokovic in January 's Australian Open final , battled past Argentina 's Carlos Berlocq . Britain 's Murray twice trailed by a break of serve in the opening set but recovered to record a 7-6 ( 7-4 ) 6-4 win . Murray 's quarterfinal opponent will be Berlocq 's compatriot Juan Martin del Potro after the 2009 U.S. Open winner breezed past veteran German Tommy Haas 6-1 6-2 . In the women 's draw , second seed Maria Sharapova beat No . 6 Sara Errani in a repeat of the 2012 French Open . It was Sharapova 's third successive win over Errani , having also got the better of the Italian at the season-ending WTA Tour Championships . `` I did n't play my best tennis throughout the whole match . Sara had many opportunities to win the first set , '' Russia 's Sharapova told the Tour 's official website after her 7-6 ( 8-6 ) 6-2 quarterfinal success . `` But I stayed strong and tough . Although I was n't playing at the highest level , I tried to be as consistent as possible and hang in there . Once I got the first set , I got in a better rhythm , which helped me and gave me more confidence . '' Sharapova 's semifinal opponent will be countrywoman Maria Kirilenko , after the 13th seed upset in-form world No . 8 Petra Kvitova with a 4-6 6-4 6-3 win .
Roger Federer and Novak Djokovic to face each other in the quarterfinals at American Wells . The pair of former world No . 1s have contested eight grand slam finals . 10-time grand slam winner Nadal has won 28 of the pair 's 28 matches . Top seed Andy Murray and No . 3 Rafael Nadal also into the last eight .