It was past midnight Friday when Madison Keys, still floating after her steamrolling semifinal win over CoCo Vandeweghe, mused on her U.S. Open title matchup with Sloane Stephens.

“I was actually just laughing and thinking who would have thought in Australia that Sloane and I would be the finalists at the U.S. Open?” Keys said. “Neither one of us were playing at the time, both just having surgeries.”

Exactly no one could have foreseen this conclusion to the women’s championship, and that includes Keys and Stephens.

Stephens suffered a left-foot injury at the Rio Olympics, needed surgery and was hobbling around on crutches during the winter. Keys had left-wrist surgery in November, returned to the game in March, then needed further surgery in June. Both missed the Australian Open, Keys played two matches at the French and two at Wimbledon. Stephens returned at Wimbledon, losing in the first round.

Yet through sheer effort, and a healthy dose of talent, Keys, 22, and Stephens, 24, are the first Americans to meet in the Open final since Venus and Serena Williams in 2002.

Keys has played at a consistently high level throughout the tournament, especially on her serve. She leads the Open with 34 aces and has had only 13 double faults. Her second serve has been very effective, especially in the later rounds and against Vandeweghe.

“Madison played an unbelievable match,” said Vandeweghe, who lost in two quick sets. “I didn’t really have much to do with anything out there.”

advertisement | advertise on newsday

Surprisingly, it’s been Stephens’ feet that have served her well here, considering that the left foot had been a major problem. In her win against Venus Williams in the semifinals, she was running down everything and seemed to get to every ball in the deciding and dramatic third set.

“I knew that it was going to be tough,” Stephens said. “I was going to have to play my way into shape starting from Wimbledon because I obviously couldn’t run that much. I was on a walking boot like a month before I played Wimbledon.

“I didn’t have all of my tools. Like, I didn’t know if I was going to be able to run down every ball, didn’t know if my power and timing was still going to be there. I didn’t know if everything was still going to be right. The only thing I had to rely on was my fight and making sure every time I was on the court I gave my all.”

Saturday’s match will be the first Grand Slam final for both players. Oddly, it will be only the second match they have ever played against each other, Stephens winning the first one two years ago.

“I’m pretty sure she killed me,” Keys said.

@NewsdaySports

They are good friends, coming up through the ranks together, playing Fed Cup together, enjoying time off the court.

“So it’s really amazing, and I have known Sloane for a long time, and she’s a close friend of mine,” Keys said. “So to be able to play her in both of our first finals is a really special moment, especially with everything that we have gone through this year.”

It’s what they have gone through off the court in the past year that brings them together and gives them a perspective on the game.

“I think time away, as good as it is, just to take a step away from it all, is good, but you realize how much you love doing this and being on the road and playing tennis,” Keys said. “So I think you just really appreciate being out here. I think that’s Sloane and me right now. I think we’re both just loving our time on court, and I think it’s really showing.”

What also has been shown is the strength of American women’s tennis, with four Americans in the semifinals for the first time since 1981.

advertisement | advertise on newsday

“The proof is in the pudding. So we don’t ever need, I don’t think, to discuss the state of American tennis,” Stephens said. “I think we are doing great. Four Americans in the semifinals and a Fed Cup final. You see all those junior girls that are playing that are from the U.S. I don’t think we have any problems.”