(CNN) -- Juan Martin del Potro suffered a shock second-round defeat at the Australian Open in the early hours of Friday morning crashing out to world no. 62 Roberto Bautista Agut.
The no. 5 seed arrived in Melbourne in good form after demolishing Bernard Tomic in straight sets in the final of the Sydney International tournament last Sunday.
But on a day of extreme heat followed by storms, the Argentine wilted in the face of some excellent serving by the Spaniard losing 4-6 6-3 5-7 6-4 7-5 in three hours 53 minutes.
"I feel comfortable on these courts. These courts are good for my game," Bautista Agut said following his epic win which finished at 1.20 am local time.
"I'm serving and returning very well. That helps me a lot. Today I could return a lot of serves from del Potro. This was the key to win the fourth and fifth sets," he added.
Del Potro, the 2009 U.S. Open champion, was gracious in defeat but will have to wait another year to better his modest record in Melbourne -- he has reached the quarterfinals twice (2009 and 2012).
"I know him very well. I think he play a great match during the four hours," del Potro said. "It's tough (to lose) when you have played at a very high level during four hours.
"But in every moment, he played unbelievable shots. During break point down, he served well. He made winners with forehands and backhands, and he played close to the lines very often during the match."
Bautista Agut's reward is a third round match against world no. 28 Benoit Paire from France.
Elsewhere in the men's draw there were no alarms for the top seeds with Rafael Nadal, Andy Murray and Roger Federer all coming through in straight sets.
World no. 1 Nadal dispatched Australian teenager Thanasi Kokkinakis 6-2 6-4 6-2 under the roof of the Rod Laver Arena while Murray overcame French qualifier Vincent Millot 6-2 6-2 7-5.
Federer, who is hunting down a fifth Australian Open title, beat Blaz Kavcic of Slovenia 6-2 6-1 7-6 to claim his 70th win in Melbourne.
"I'm happy on a hot day like this," Federer said.
"It was a good first two sets I thought. I played really aggressive and it worked out. Third set I think he was more consistent. He served better. In the process, it got closer. I'm happy I got it done in three," he added.
World no. 10 and 2008 finalist Jo-Wilfried Tsonga is also safely through to the third round after beating Thomaz Bellucci from Brazil 7-6 6-4 6-4.
Japan's Kei Nishikori is also safely through after seeing off Serbia's Dusan Lajovic in straight sets 6-1 6-1 7-6.
In the women's draw, defending champion Victoria Azarenka made light work of her second round opponent Barbora Zahlavova Strycova from the Czech Republic.
The Belarusian, who is looking to clinch a third straight title in Melbourne, won through 6-1 6-4 in just under 90 minutes to set up a meeting with Yvonne Meusburger from Austria.
The 2008 champion, Maria Sharapova had a far more punishing match, taking three hours to beat Italy's Karin Knapp 6-3 4-6 10-8.
"I'm really happy to get through today. I really am," a relieved Sharapova said after a energy-sapping match in the searing heat.
"I worked really hard in the last few months and I wanted this match. I didn't play my best tennis. I didn't do many things well. But I got through it, and sometimes that's what's important." she added.
France's Alize Comet is up next for the 26-year-old Russian.
Tenth seed Caroline Wozniacki is also through after a three-set win (6-0 1-6 6-3) against Christina McHale from the U.S. while fifth seed Agnieszka Radwanska booked a third round spot after a straight sets 6-0 7-5 victory against Olga Govortsova from Belarus.
Former semi-finalist Jelena Jankovic from Serbia was also a winner on Thursday. The eighth seed steamrollered Japan's Ayumi Morita 6-2 6-0.
Thirteenth seed and last year's semi-finalist Sloane Stephens dropped the first set against her second round opponent Croatia's Ajla Tomljanovic, but bounced back to win 3-6 6-2 7-5.
The American will face Elina Svitolina from the Ukraine in the third round.