There was nothing to separate Justin Rose and Henrik Stenson through 71 holes with the former Ryder Cup partners both 15-under par as they stepped on to the 18th green at the Olympic Golf Course on Sunday afternoon.

However, after Rose’s third shot, an extraordinary pitch from 38 yards that landed within three feet of the pin, it was Stenson who blinked. The Open champion three‑putted from 20 feet to give Rose two putts for the first Olympic gold medal in golf since 1904. He would only need one.

The 36-year-old Briton finished with a five-under 67 to hold off a stern challenge from the in-form Stenson and an inspired charge by Matt Kuchar, becoming the first Olympic gold medallist since George Lyon of Canada won the competition at Glen Echo Country Club at the St Louis Olympics. After sinking the winning putt Rose raised his right fist in the air and embraced Stenson before finding his wife Kate in the family zone behind the 18th hole.

“It’s a dream come true,” Rose said. “I’ve been thinking about Rio for a long, long time. I’ve been dreaming about coming here for a few years now. I was hoping my ranking would allow me to compete in the Olympic Games.

“I came here in good form and I felt excited about competing, excited about giving it 100%. Then when I actually got down to Rio and experienced the whole vibe of the Olympics, to come out of it with a medal is incredible. To come out of it with gold, unbelievable.”

Stenson, playing the best golf of his career after the duel with Phil Mickelson at Royal Troon last month, started the final round one shot off the pace and had shot a bogey-free round with four birdies through 13 holes. But he was forced to summon the trainer to help with back issues on the 14th hole, which left him face down on the tee for a brief spell. He went on to bogey the hole.

“I didn’t make the best swings there for a little while but it wasn’t hindering me too much,” Stenson said. “But it’s not something you plan to have worked on out on the course.

“It did kind of put me out of rhythm a little bit, but I was still there till the end. It was just down to whoever made a birdie on the last, otherwise we would have been out for a play-off.”

Both players held off a fierce challenge by Kuchar, the American who started the day five-under in a tie for seventh but shot a 63 to tie the course record and secure the bronze.

Named to the US team only after Jordan Spieth withdrew due to concerns over the Zika virus, Kuchar had already moved into the bronze position after going four‑under on the front nine. But when he followed two excellent shots on the 10th with a 13-foot putt for eagle, the gold was suddenly within touching distance. “My heart started pounding out of my chest,” Kuchar said.

He might have done even better, but he three-putted on the 16th and left a 17-foot birdie putt short on the 18th to finish with a 13-under 261. Afterwards, he cried on the medal stand while carefully inspecting his medal.

Bubba Watson, who shot a 70 to finish seven-under and tied for eighth, was pulling for his countryman all the way. “I was grinning from ear to ear every time I looked at the leaderboard and saw he was making pars and making birdies, he was going to get a medal,” the two-time Masters winner said. “As long as he signed the scorecard the right way, he was going to get a medal.”

Germany’s Thomas Pieters was fourth at nine-under after a 65 while there was a three-way tie for fifth at eight-under.

A week of lively galleries at the new course within the Marapendi reserve in Barra da Tijuca peaked with a sold‑out crowd of 15,000 on a balmy Sunday afternoon with a steady ocean breeze. The showdown between Rose and Stenson, who went head to head with neither extending their advantage to more than one shot the entire round, offered a storybook ending to a week that began in doubt – with many of the sport’s top stars having withdrawn.

“To call yourself an Olympian is something very special,” Stenson said. “To be an Olympic medallist is even more special. I’m very pleased that I went here. It was the experience of a lifetime.”

During the week Rose said: “The atmosphere is more like a Ryder Cup than a major but it’s more unique than either of those two. You can’t compare it to anything else.”

With many first-time spectators in the crowd – golf is not popular in Brazil – the lighter side of the Olympics’ grand experiment reared itself in unexpected ways. When Rose’s drive off the 2nd tee sailed into the gallery, a fan picked it up thinking she could keep it. Rose was allowed to drop because the exact finishing spot was unknown. Yet little else went wrong for the Englishman, who started the week with the first Olympic hole-in-one and ended it with a historic gold.

“I’ve had a few fitness issues this year,” he said. “In the back of my mind I wanted to be 100% for Rio. I’ve done a lot of hard work and I’ve sacrificed a lot of hours in the gym just to really get myself feeling good. To be honest, things started to really trend up this week. I felt strong, my recovery was great and each day I came out playing my best golf.”