Invincible on Europe's dusty red clay courts where he has carved out 60 successive victories, Nadal resembled a grasscourt novice at times against 237th-ranked Robert Kendrick but battled back to win 6-7 3-6 7-6 7-5 6-4 on Centre Court.
Agassi, in his 14th and final Wimbledon, had no such trouble against Italy's Andreas Seppi, using all his experience on the slick lawns in a 6-4 7-6 6-4 win on court one.
Kendrick, delighting the crowd with a textbook display of old school serve and volley tennis, reeled off six points in a row to take the first set tiebreak and then completely dominated the muscular Mallorcan in the second.
The double French Open champion sneaked a third set tiebreak and then got the decisive break in the fourth set when a tiring Kendrick double-faulted.
Another double fault cost Kendrick his serve at 2-3 in the fifth and a fist-pumping Nadal pounced to complete only his second career victory from a two-set deficit.
Defending women's champion Venus Williams also found herself in a hole when she trailed 7-6 5-2 against compatriot Lisa Raymond in the second round.
The sixth seed recovered her composure in the nick of time, however, unleashing a barrage of winners to claim a 6-7 7-5 6-2 victory and stay on course for a fourth title here.
Fourth seed Maria Sharapova, still waiting for a sequel to her 2004 Wimbledon triumph, progresed to the third round with a powerful 6-2 6-2 victory over American Ashley Harkleroad.
The 19-year-old Russian was given a rare excursion to court two, dubbed the graveyard of champions but came through with few alarms.
There were a few shocks littered around the All England Club as seeds began to feel the heat.
Patty Schynder became the highest women's seed to exit this year's Wimbledon when she was beaten 4-6 6-1 6-4 by France's Severine Bremond, while men's 11th seed Tommy Robredo fell 7-6 6-2 6-4 to rising Serb teenager Novak Djokovic.
Former French Open champion Gaston Gaudio, the 16th seed, is also packing his bags after losing 6-4 6-2 6-3 to Irakli Labadze of Georgia.
Results (second round)
Men’s: 15-Sebastien Grosjean (France) beat Jamie Delgado (Britain) 6-3 3-6 6-2 6-3; Jonas Bjorkman (Sweden) beat Lukas Dlouhy (Czech Republic) 6-3 6-4 4-6 1-6 6-4; 2-Rafael Nadal (Spain) beat Robert Kendrick (U.S.) 6-7(4) 3-6 7-6(2) 7-5 6-4; Irakli Labadze (Georgia) beat 16-Gaston Gaudio (Argentina) 6-4 6-2 6-3; Daniele Bracciali (Italy) beat Stefano Galvani (Italy) 6-3 6-7(3) 6-3 6-4; 25-Andre Agassi (U.S.) beat Andreas Seppi (Italy) 6-4 7-6(2) 6-4; 13-Tomas Berdych (Czech Republic) beat Fabrice Santoro (France) 6-4 6-7(6) 2-6 7 -6(5) 6-4; Mardy Fish (U.S.) beat Melle van Gemerden (Netherlands) 6-2 6-0 6-1; 18-Marcos Baghdatis (Cyprus) beat Andrei Pavel (Romania) 3-0 (Pavel retired); Philipp Kohlschreiber (Germany) beat Alejandro Falla (Colombia) 6-4 6-4 3-6 7-6( 1); Novak Djokovic (Serbia and Montenegro) beat 11-Tommy Robredo (Spain) 7-6(5) 6-2 6-4; 22-Jarkko Nieminen (Finland) beat Martin Lee (Britain) 6-4 6-0 6-3.
Women's: 6-Venus Williams (U.S.) beat Lisa Raymond (U.S.) 6-7(4) 7-5 6-2; 26-Jelena Jankovic (Serbia and Montenegro) beat Vania King (U.S.) 6-2 4-6 6-4; Nicole Pratt (Australia) beat 29-Tatiana Golovin (France) 2-6 6-4 6-4; Shenay Perry (U.S.) beat Melanie South (Britain) 7-6(5) 6-2; 7-Elena Dementieva (Russia) beat Meghann Shaughnessy (U.S.) 5-7 6-3 7-5; 25-Elena Likhovtseva (Russia) beat Tiantian Sun (China) 6-3 6-3; 15-Daniela Hantuchova (Slovakia) beat Jamea Jackson (U.S.) 6-3 4-6 7-5; Severine Bremond (France) beat 8-Patty Schnyder (Switzerland) 4-6 6-1 6-4; 21-Katarina Srebotnik (Slovenia) beat Alicia Molik (Australia) 6-2 6-1; Tamarine Tanasugarn (Thailand) beat Shinobu Asagoe (Japan) 6-3 7-5; 9-Anastasia Myskina (Russia) beat Martina Mueller (Germany) 6-2 6-1; Shuai Peng (China) beat 20-Shahar Peer (Israel) 6-4 7-6(5); Agnieszka Radwanska (Poland) beat Tsvetana Pironkova (Bulgaria) 7-5 7-6(5); 4-Maria Sharapova (Russia) beat Ashley Harkleroad (U.S.) 6-2 6-2; 16-Flavia Pennetta (Italy) beat Laura Granville (U.S.) 6-2 6-1; Amy Frazier (U.S.) beat Melinda Czink (Hungary) 6-2 6-3.—Reuters