Sloane Stephens played a near flawless match to defeat Madison Keys and capture her first career Grand Slam title.

NEW YORK — American tennis had never had it better. All of women’s tennis, actually. From one day to the next for nearly a fortnight, a delightful game of “can you top this” occurred on the courts of the U.S. Open.

There was Maria Sharapova’s triumphant return from a doping suspension, at least for the first week. There was another fabulous run by the 37-year-old Venus Williams, all the way to the semifinals, beating the inspiring Petra Kvitova along the way before losing in three magnificent sets to Sloane Stephens, who had been ranked 957th six weeks earlier.

There was the other side of the draw, and two more Americans bubbling to the top, youngsters named Madison Keys and Coco Vandeweghe, completing the first all-American semifinals at a women’s Grand Slam event in 32 years.

Whatever awaited in Saturday’s women’s final had to be terrific, didn’t it, if only to serve as a fitting coda to the 2017 Grand Slam season? 

    MORE WOMEN’S COVERAGEStephens dominates Keys for title

    MEN’S FINAL: Anderson can make history against Nadal

But then, unfortunately, it wasn’t. It wasn’t good at all. Stephens, 24, who had been out for 11 months with a stress fracture in her left leg, dominated the overly nervous Keys, 22, in just 61 minutes 6-3, 6-0.

What a disappointment this was. This wasn’t the way these two stupendous weeks were supposed to end. The news media interviews Saturday afternoon with Billie Jean King and Emma Stone for the upcoming movie Battle of the Sexes lasted longer than the match.

But then, something extraordinary happened. It turns out the match wasn’t the end of this tournament. There was something more coming, something infinitely more interesting and uplifting.

It began when Keys all but melted into Stephens’ arms at the net, the two dear friends holding onto each other for what seemed an eternity so Stephens could console her friend, who was in tears.

A minute or two later, while waiting on preparations for the awards ceremony, Stephens decided to kill time by joining Keys in a chair on her side of the net so they could talk. This wasn’t unprecedented, but it was lovely nonetheless.

“We have known each other for so long and we have been…