Defending champion Novak Djokovic and home favourite Rafael Nadal were made to work hard to reach the third round of the Madrid Open on Wednesday.
Djokovic overcame Spaniard Nicolas Almagro 6-1, 4-6, 7-5.
Almagro, ranked 76th, broke Djokovic in the opening game but the world number two roared back to win six consecutive games, finishing the last with a tidy drop shot.
Spaniard Almagro, who has never gone beyond the quarter-finals in a grand slam, grew in confidence in the second set, however, with the backing of the home support and saved two break points before forcing a decider.
An upset looked on the cards when Almagro broke Djokovic at the first attempt in the third set and marched into a 3-0 lead but the Serb drew on his experience to battle back, breaking the 31-year-old twice before serving out for the match.
The Serbian, who recently split from his long-term coach Marian Vajda, is trying to regain his best form again ahead of the French Open. Four-times winner Nadal twice bounced back to win the first set in a thrilling tiebreak.
Nadal endured a three-hour epic with Italy’s Fabio Fognini before progressing 7-6 (7-3), 3-6, 6-4.
Fognini played aggressively, however, and forced Nadal on to the defensive as he took the match into a deciding set.
After failing to take advantage of one match point, Nadal emerged victorious thanks to two powerful forehands and the 30-year-old world number five next faces Australian Nick Kyrgios.