After embracing Schwartzman at the net, his spot in a 10th Australian Open quarterfinal secure, the top-ranked Nadal draped an arm around his Argentine friend and patted him on top of the head.
"A great battle ... he's a good friend of mine,'' Nadal said. "This is the first big match that I played in 2018. One match like this probably helps. That's confidence for myself, that's confidence I can resist for four hours on court at a good intensity.''
Nadal lost last year's Australian Open final in five sets to Roger Federer, but went on to regain the No. 1 ranking and win the French and US Open titles before bringing his season to a premature end because of an injured right knee.
He didn't play a competitive match before the season-opening major, and advanced through three rounds without dropping a set.
That streak ended when Schwartzman took the second set to level the match, rebounding three times after dropping serve to break back against Nadal.
The crucial second game of the fourth set lasted almost 13 minutes and 20 points, with Nadal finally holding after saving five break points as Schwartzman attacked him with everything he had.
The 16-time major winner broke again in the next game and withstood more break points -- seven in all in the last set and 15 of 18 in the match -- before breaking Schwartzman's serve in the final game and clinching it on his third match point in 3 hours, 51 minutes.
"It was a big battle. I was really relieved I played such a good tiebreaker at the end,'' the 2014 US Open winner said. Of his Grand Slam milestone, Cilic said he hadn't been aware of it before the match, "but it's beautiful to hear.
"I had the 300th win of my career at the US Open in 2014, so this is also beautiful one. I hope I'm going to continue and gather three more here.''
Kyle Edmund reached his first Grand Slam quarterfinal and continued 33-year-old Andreas Seppi's long drought with a 6-7 (4), 7-5, 6-2, 6-3 win at Hisense Arena. Seppi has now played 52 majors without reaching the quarterfinals -- he has lost in the fourth round five times.
Grigor Dimitrov has reached the Australian Open quarterfinals for the third time and put the last local hope out of the season-opening major with a 7-6 (3), 7-6 (4), 4-6, 7-6 (4) win over Nick Kyrgios.
Both players got tense in the fourth set, with Dimitrov broken while serving for the match and Kyrgios smashing an easy overhead into the net on a break point.
The No. 3-ranked Dimitrov lost to Kyrgios in the semifinals at the Brisbane International earlier this month, but avenged it on the major stage. He will next play Edmund.
The Associated Press contributed to this report.