GLENEAGLES, Scotland — Suzann Pettersen stood over the final shot of her golfing career, not quite realizing it also was the last shot of the most dramatic Solheim Cup ever played.
Europe’s players had their hands over their mouths, and their captain could barely watch. Blissfully unaware of what was unfolding was 1-year-old Herman, Pettersen’s first child who was also among the thousands around the 18th green at Gleneagles.
The putt was from 7 feet, slightly left to right, and it never looked like missing.
After being mobbed by her teammates on the 18th green, an emotional Pettersen held Herman in her arms and kissed him. The Europeans had regained the Solheim Cup and one of the stalwarts of women’s golf had her perfect ending.
‘‘Yeah, this is it. I’m completely done,’’ said the 38-year-old Pettersen, confirming her sudden decision to retire. ‘‘It doesn’t get any better.”
On an afternoon of singles matches that pretty much had everything, Europe secured a 14½-13½ win over the United States to claim the biggest team prize in female golf for the first time since 2013.
The final act, spread over two holes with virtually simultaneous putts, could not have been more thrilling.
Just as Pettersen was addressing her putt at No. 18, US player Ally McDonald slid a putt to the right of the hole at No. 17 and walked up to Bronte Law to concede the match in favor of the Europeans.
The score changed to 13½-13½ and — without her even realizing — the outcome of the contest hinged on Pettersen.
‘‘I thought Bronte was in behind me on the [18th] fairway,’’ Pettersen said. ‘‘I actually didn’t know that it was THE putt.’’
That it was Pettersen who secured the winning point felt apt.
She was a contentious wild-card pick by European captain Catriona Matthew because Pettersen had played just two tournaments — missing the cut in both — since November 2017. She had time off before and after giving birth to Herman, and then because of injury.
Pettersen also had a score to settle with the Solheim Cup. In her most recent appearance, at St. Leon-Rot in Germany in 2015, she refused to concede a short putt to Alison Lee on the 17th hole of a tight four-ball match before the singles on the final day. There were angry exchanges, and it stoked a fire inside the Americans as they fought back from 10-6 down going into the singles to win, 14½-13½.
Pettersen later apologized.
‘‘She gone from villain to hero,’’ said Laura Davies, one of the European vice captains.
Pettersen’s redemption story was delivered in Scotland, the home of golf, where the US team hasn’t won in three attempts. Playing in her ninth Solheim Cup, Pettersen won two of her three matches and is now a four-time Solheim Cup winner.
The day started with the teams locked at 8-8 after four sessions, and the first definitive break of the entire contest happened when the Americans took the lead for the first time since Friday lunchtime, at 12-11.
At 13½-11½, they needed just a half-point from the final three singles matches out on the course to guarantee retaining the cup, but then came the European fightback.
Anna Nordqvist completed a 4-and-3 win over Morgan Pressel. Then, on No. 17, Law sealed a 2-and-1 win over McDonald to tie the score. Pettersen delivered for Europe on No. 18, but only after her opponent, Marina Alex, slid a 10-foot birdie putt wide that, if it had found the hole, would have been enough for the US.
‘‘I told them afterward, the sun’s going to come up tomorrow,’’ said US captain Juli Inkster, when asked what she’d said to her players. ‘‘It was great for women’s golf. We played great.
‘‘But you know what, the Europeans played great. You tip your hat. And you move on to Toledo.’’
Inkster won’t be there in 2021, confirming afterward that she will not be captain for a fourth straight match. She finishes with two victories from three Solheim Cups as captain.
Two of the Americans, in particular, will still look back on the week with fond memories despite the loss. Jessica and Nelly Korda, the first sisters to play together in four-balls or foursomes at the Solheim Cup, both finished with 3½ points from four matches after coming from behind to win in the singles.
Nelly Korda, out in Match 2, was 3 down after nine holes against Caroline Hedwall but won, 2 up. Jessica Korda, who at age 26 is five years older than her sister, beat Caroline Masson, 3 and 2, after being 2 down.
Other key interventions for the US in the singles came from Megan Khang, who birdied No. 18 to claim a half-point against Charley Hull, and Lizette Salas, who parred the last for a 1-up win over Anne van Dam.
But Europe, which had a historically inferior record in singles, managed to win the session, 6½-5½ after victories in three of the first matches to finish — including Georgia Hall taking down world No. 3 Lexi Thompson, 2 and 1 — and then those last three matches.
Hall and Celine Boutier, a 2-and-1 winner over Annie Park, both won all four of their matches.
Thompson, the highest-ranked player at Gleneagles, collected just two half-points from four matches.
Matthew, carried shoulder-high by her players on the 18th green, celebrated victory in her home country.
And Pettersen closed her career with 21 points in the Solheim Cup, the Norwegian described by Matthew as ‘‘one of the trailblazers in women’s golf.’’
‘‘Coming down No. 18, Beany [Matthew] said, ‘It’s why I picked you,’ ’’ Pettersen said. ‘‘In your wildest dreams, especially where I’ve come from, I never thought I was going to do this again.’’
Europe 6½, US 5½
Carlota Ciganda, Europe, def. Danielle Kang, US, 1 up
Nelly Korda, US, def. Caroline Hedwall, Europe, 2 up
Georgia Hall, Europe, def. Lexi Thompson, US, 2 and 1
Celine Boutier, Europe, def. Annie Park, US, 2 and 1
Angel Yin, US, def. Azahara Munoz, Europe, 2 and 1
Megan Khang, US, halved with Charley Hull, Europe
Lizette Salas, US, def. Anne Van Dam, Europe, 1 up
Jessica Korda, US, def. Caroline Masson, Europe, 3 and 2
Brittany Altomare, US, def. Jodi Ewart Shadoff, Europe, 5 and 4
Suzann Pettersen, Europe, def. Marina Alex, US, 1 up
Bronte Law, Europe, def. Ally McDonald, US, 2 and 1
Anna Nordqvist, Europe, def. Morgan Pressel, US, 4 and 3