For 30 minutes on Saturday, Madison Keys was nearly flawless at the Adelaide International. Her flat, heavy shots forced Jessica Pegula to crowd the baseline, where she was often hitting what amounted to half-volleys. Keys had 13 winners -- 10 more than Pegula -- and broke her serve three times.

Adelaide: Scores Schedule Draws

But then the second set arrived, and Keys began grimacing.  After Pegula took a 3-0 lead, the trainer was summoned and a medical timeout followed. Keys returned from the locker room with her left thigh wrapped and soon she was down 4-0.

At that point, the trajectory of the match appeared to be fairly evident. The top-seeded Pegula likely would prevail in three sets over an ailing Keys.

But that’s not what happened. With a truly dominant deciding set, Keys was a 6-3, 4-6, 6-1 winner over her fellow American and good friend.

“Luckily, with the magic of tape, things felt a little bit better, and I was able to get through the match,” Keys told reporters afterward. “I think once the kind of immediate kind of panic of, `Oh no, something is happening,’ I think I finally relaxed and was able to refocus on the match.

“In some ways it just made me kind of go for it a little bit more, and go after things a little bit quicker, which luckily they were going in.”

For Keys, who turns 30 next month and got married last fall -- Pegula was a guest at the wedding in South Carolina -- this was a marvelous start to the year.

“You played some amazing tennis,” Pegula said at the trophy presentation, “hit the ball harder than anybody.”

Indeed, Keys finished with some gaudy numbers (36 winners and 10 aces) that underlined her usual power, the Thunder Down Under. She finished the tournament with 42 aces. But there were also slices, drop shots and a killer kick serve to go with her consistently deep balls.

It was the second Adelaide title for Keys. She won here two years ago, when it was a WTA Tour 250 -- but never faced a player in the Top 15.

At this upgraded WTA 500, Keys did some serious heavy lifting, defeating the No.7-ranked Pegula, No.8 Daria Kasatkina and No.17 Jelena Ostapenko. This final was Keys’ 30th career Top 10 win.

Keys has now won her last two matches against Pegula in three tries. This was her ninth WTA Tour title and she’s now 9-5 in finals. She’s projected to return to the Top 15 on Monday when the PIF WTA Rankings are released.

“I feel like there was a lot to build on after last year,” Keys said. “I felt like I was playing some pretty good tennis. I didn’t have the consistency that I wanted because I unfortunately had a few longer breaks due to injury. So, it was really just kind of accumulation of kind of taking all of the work that we did last year and all of that, and then having a really good off-season and just going for it.”

It was a match with some exceedingly sharp turns of momentum.

Keys won the first two games, lost the next three, then won four straight to take the first set. Pegula took that 4-0 lead in the second but Keys came back to win three consecutive games. Pegula won her two next service games to win the set. Keys closes by winning six of seven.

Keys thrives in Australia -- she’s reached the semifinals in Melbourne twice -- but a shoulder injury forced her to miss the Australian and Middle East portions of last season.

She’ll need to be at full strength in Melbourne. No.10 seed Danielle Collins could be waiting in the third round, with No.6 Elena Rybakina a possibility if she gets to the Round of 16.

“I think that I haven’t quite gotten my brain onto Melbourne yet -- I’m still pretty firmly in Adelaide right now,” Keys said, laughing. “I think when I’m playing good tennis a lot of really good things can happen.”

In the semifinals, Keys was a 5-7, 7-5, 3-0 winner when Liudmila Samsonova retired with an abdominal injury.

“Obviously not how you want to finish,” Keys told reporters. “I’m just really proud of myself for being able to stay in the match and give myself the opportunity to get the win.”

Against Pegula, Keys was the one compromised -- and she still gave herself the opportunity and managed to win the match.