In front of a packed crowd on Grandstand, Wawrinka repeatedly gave his fans reasons to believe before Berrettini found ways to shut the door, as the pair produced another rollercoaster after their dramatic clash at this year's Wimbledon.
The 2016 champion fell behind early but sparked the crowd into life, breaking to love when Berrettini served for the opening set to pull level.
Wawrinka then earned a set point in a marathon game, but Berrettini survived four deuces to force a tiebreak. The 30-year-old held his nerve again, winning three consecutive points to take the opener.
The second set offered Wawrinka another opening as a brief rain interruption was followed by an early break of Berrettini's serve.

But the Swiss could not make his advantage count. He had seven break points, including three set points, yet Berrettini repeatedly found a way out before breaking back and forcing another tiebreak, which he won to move within a set of victory.
The third set brought no let-up, with the opening game stretching to 16 minutes after a frustrated Berrettini unsuccessfully challenged a call involving a possible double hit.
Yet the former world number six emerged from the long battle with the first of three breaks to dish out a bagel that brought down the curtain on Wawrinka's glittering Grand Slam career.
Wawrinka's appearance in New York carried added significance after the three-time Grand Slam champion was initially left out of the singles field despite applying for a wildcard.
The decision prompted an outcry from fans, and he was eventually given a place after American Patrick Kypson withdrew with an injury.
Wawrinka, who reached a career-high ranking of world number three, had said before the tournament that he was at peace with his career and simply grateful for one final opportunity at the Grand Slam he won 10 years ago.
Berrettini, a semi-finalist in New York in 2019, will face Mariano Navone in the second round after the Argentine produced the tournament's biggest upset by knocking out fourth seed Novak Djokovic in five sets on Sunday.
US Open 2026
The US Open is the fourth and final Grand Slam of the tennis season, running from August 30th to September 13th. It is a hard-court tournament held at Flushing Meadows in New York City. Follow the links below for more information!
All you need to know | Men's singles draw | Women's singles draw | Latest US Open news
