In April 2002, at 15 years and 10 months, the world No. 762 Nadal won his first ATP match, defeating Ramón Delgado, and became the ninth player in the open era to do so before the age of 16. The following year, Nadal won two Challenger titles and finished the year in the top 50. At his Wimbledon debut in 2003, Nadal became the youngest man to reach the third round since Boris Becker in 1984. During 2004, Nadal played his first match against world No. 1 Roger Federer at the 2004 Miami Masters, and won in straight sets. He is one of the six players that defeated Federer that year (along with Tim Henman, Albert Costa, Gustavo Kuerten, Dominik Hrbatý, and Tomáš Berdych). He missed most of the clay court season, including the French Open, because of a stress fracture in his left ankle.[10] Nadal, at 18 years and six months, became the youngest player to register a singles victory in a Davis Cup final for a winning nation. By beating world No. 2 Andy Roddick, he helped Spain clinch the 2004 title over the United States in a 3–2 win. He finished the year ranked world No. 51.
At the 2005 Australian Open, Nadal lost in the 4th round to eventual runner-up Lleyton Hewitt. Two months later, Nadal reached the final of the 2005 Miami Masters, and despite being two points from a straight-sets victory, he was defeated in five sets by world No. 1 Roger Federer. Both performances were considered to be breakthroughs for Nadal.
He then dominated the spring clay court season. He won 24 consecutive singles matches, which broke Andre Agassi's open era record of consecutive match wins for a male teenager. Nadal won the Torneo Conde de Godó in Barcelona and beat 2004 French Open runner-up Guillermo Coria in the finals of the 2005 Monte Carlo Masters and the 2005 Rome Masters. These victories raised his ranking to world No. 5 and made him one of the favorites at his career-first French Open. On his 19th birthday, Nadal defeated Federer in the 2005 French Open semifinals, being one of only four players who defeated the top-seeded player that year (along with Marat Safin, Richard Gasquet, and David Nalbandian). Two days later, he defeated Mariano Puerta in the final, becoming the second male player to win the French Open on his first attempt since Mats Wilander in 1982: He also became the first teenager to win a Grand Slam singles title since Pete Sampras won the 1990 US Open at age 19. Winning the French Open improved Nadal's ranking to World No. 3.
Three days after his victory in Paris, Nadal's 24-match winning streak was snapped in the first round of the grass court Gerry Weber Open in Halle, Germany, where he lost to the German Alexander Waske. He then lost in the second round of 2005 Wimbledon to Gilles Müller of Luxembourg.
Immediately after Wimbledon, Nadal won 16 consecutive matches and three consecutive tournaments, bringing his ranking to world No. 2 on 25 July 2005.
Nadal started his North American summer hard-court season by defeating Agassi in the final of the 2005 Canada Masters, but lost in the first round of the 2005 Cincinnati Masters. Nadal was seeded second at the 2005 US Open, where he was upset in the third round by World No. 49 James Blake in four sets.
In September, he defeated Coria in the final of the China Open in Beijing and won both of his Davis Cup matches against Italy. In October, he won his fourth ATP Masters Series title of the year, defeating Ivan Ljubičić in the final of the 2005 Madrid Masters. He then suffered a foot injury that prevented him from competing in the year-ending Tennis Masters Cup.
Both Nadal and Federer won eleven singles titles and four ATP Masters Series titles in 2005. Nadal broke Mats Wilander's previous teenage record of nine in 1983. Eight of Nadal's titles were on clay, and the remainder were on hard courts. Nadal won 79 matches, second only to Federer's 81. Nadal won the Golden Bagel Award for 2005 with eleven 6–0 sets during the year. Also, he earned the highest year-end ranking ever by a Spaniard and the ATP Most Improved Player of the Year award.