A little more than a month ago, the idea that Coco Gauff and Jessica Pegula might enter the U.S. Open as the two hottest players in tennis would have seemed preposterous.

Gauff had endured a disappointing and disheartening spring and early summer. There was yet another one-sided loss to Iga Swiatek, the world No. 1, at the French Open, and then a first-round exit from Wimbledon.

Pegula had run into her quarterfinal wall once more at Wimbledon, despite having a break point for a 5-1 lead in the third set against Marketa Vondrousova, the eventual champion. And as a doubles team, Gauff and Pegula had lost the French Open final and fell in the fourth round at Wimbledon.

Then came August.

There are essentially three women’s singles tournaments that matter during the North American hardcourt swing before it culminates in the U.S. Open. Gauff and Pegula swept them.

On successive Sundays, Gauff won the Citi Open in Washington, D.C., Pegula won the National Bank Open in Montreal, and Gauff won the Western & Southern Open in Cincinnati. In the course of a month, they positioned themselves as legitimate contenders to take their home-country Grand Slam.

That can be a double-edged sword for Americans coming to New York, where the spotlight burns hottest, distractions abound, and there is so, so much noise, both literal and metaphorical. Subways and commuter trains rumbling by the stadiums, planes from LaGuardia roaring above and crowds screaming from the stands represent the Sturm und Drang that goes with carrying the hopes and expectations of the hometown fans.

“Just embracing it,” Gauff, 19, said after the tournament in Cincinnati. It was the biggest win of her career, especially given that she beat Swiatek, in the semifinals, for the first time. Gauff had been 0-7 against Swiatek, losing all 14 of their sets, heading into that match.

“Everybody’s path for you is not what’s true, it’s not what’s going to happen,” said Gauff, who has been playing with weighty expectations since she made the fourth round of Wimbledon when she was just 15. “Even the path that you want for yourself may not happen.”

Pegula, 29, has come to this moment from the opposite end. A classic late-bloomer who doesn’t have the height or obvious athleticism of many of the best women, she did not crack the top 100 until she was 25 years old. Now she is ranked third in the world, yet she often goes unmentioned in discussions of the world’s best players.

That is not necessarily a bad thing for Pegula, who last week was trying to keep things low-key, even as she headlined a junior tennis clinic in Harlem and bounced from one sponsor event or interview to another.

“I didn’t think I would be here, but at the same time, I’m really happy that I am,” Pegula said before banging balls for more than an hour with some of Harlem’s better young players.

As the U.S. Open gets underway, American tennis is riding high on optimism. A year after the retirement of Serena Williams, there is a “who’s next” vibe coursing through the sport. The U.S. is the only country with two women in the top six. The country also has two men in the top 10 for the first time in years, with plenty of eyes on last year’s breakout semifinalist, Frances Tiafoe.

That is no small thing to manage.

“It’s our home slam,” the American Danielle Collins, 29, said in an interview last week. “You so want to do well.”

Collins arrived in New York for last year’s Open just seven months removed from coming within a set of winning the sport’s other hardcourt Grand Slam, the Australian Open, where she lost in the finals to the world No. 1 Ashleigh Barty.

Last year Collins didn’t know how she was going to react to what awaited her at the Billie Jean King National Tennis Center. Organizers scheduled her in a series of featured night matches, and she found herself soaking in the energy and the surreal experience of living through something she had dreamed about when she was a child watching the tournament on television. In the moments when her heart raced, she focused on slowing her breath, sometimes alternating her inhales from one nostril to the other.

“This is going to sound strange, but you have to play like you don’t care,” said Collins, who made the fourth round before falling in a three-set match to Aryna Sabalenka.

That is easier said than done, especially for Gauff and Pegula, who know they are in one of those rare moments in their careers where their form and their fitness are peaking and they are brimming with confidence.

In July, Gauff was frustrated with her recent results, the shakiness of her forehand and the dichotomy between the progress she felt she was making in training and her inability to get crucial wins. She added a new coach to her team who should be familiar to anyone who has paid attention to tennis, especially in America the past 40 years.

Brad Gilbert, the former pro and ESPN commentator who coached Andre Agassi and Andy Roddick, had spent much of his coaching time during the previous year turning Zendaya, the actress and singer, into a serviceable tennis player for her part in the movie “Challengers” due out next spring, about a professional tennis love triangle.

Gilbert, 62, was keen for another gig with a top player, and began interviewing with Gauff’s parents and agent after her loss at Wimbledon. Gauff was reluctant.

To Gauff, Gilbert’s coaching success had mostly happened before she was born, she said with a giggle during the Citi Open. That said, Gilbert did start with both Agassi and Roddick shortly before they each won the U.S. Open. And his tweaks to her strokes, making them slightly shorter and more controlled and reminding her at every turn of her supreme athleticism — no one covers a court like Gauff these days — began to show immediate results.

“Let’s be real, anybody who is watching me play knows what I need to work on,” Gauff said in Washington when asked whether there might be conflicts between Gilbert and Pere Riba, the coach she hired in June. “You know, they know, the fans know.”

For Pegula, she said she let the sadness of her Wimbledon loss marinate for a couple of days. But once she arrived home in Florida, the relentlessness of the tennis schedule forced her to start mapping out her U.S. Open training plan — gym sessions, court time, treatments with her physiotherapist.

Then she headed to Montana for a few days. She rode a horse and went fly fishing. She immersed herself in the natural beauty and felt rejuvenated.

Still, she arrived in Montreal feeling slightly under the weather and unfocused. Her initial goal was just to survive the first match, and she did. Three days later, she beat Swiatek in the semifinals, then won the final, 6-1, 6-0, beating an exhausted Liudmila Samsonova, who was forced to play her rain-delayed semifinal match earlier that day.

Pegula brushed off her round-of-16 loss in Cincinnati to Marie Bouzkova and headed to New York, where she tries to let the energy of the city and the fans flow into her tennis, especially when she takes the court with Gauff for doubles.

“I remember even last year,” she said. “We lost the first round, but we had an amazing crowd.”

More of that is on the way.