Jon Rahm hailed the "power of positive thinking" after winning his first major title with a stunning finish in the 121st US Open and credited a call from Padraig Harrington for inspiring him.

Rahm became the first Spanish player to lift the title and also returned to the top of the world rankings after making birdies on the final two holes at Torrey Pines to finish a shot ahead of Louis Oosthuizen.

The 26-year-old had tested positive for Covid-19 just 15 days earlier and was given the news moments after completing a third round of 64 to establish a six-shot lead in defence of his title at the Memorial Tournament.

Reeling from that disappointment, Rahm received a call from Team Europe Ryder Cup captain and three-time major winner Harrington.

"The first person who called me that wasn't family me was Padraig Harrington," he said of the Dubliner.

"And he told me a story in which he was leading by five after 54 holes, signed the wrong scorecard and got disqualified. He said he got a lot more and learnt more from that instance than he would have ever learned from a win.

"So I believed from the biggest setbacks, you can get some of the biggest breakthroughs and I felt it today out there on the golf course. I had in mind Padraig and I knew today was my day."

Rahm, who was able to cut short a 10-day period of self-isolation last Saturday after twice testing negative, added that "this is the power of positive thinking" in overcoming the setback.

"I was never resentful for one second for what happened. And I don't blame anybody. It's been a difficult year and unfortunately Covid is a reality in this world and it's affected a lot of people.

"We have lost a lot of people back home. We have lost some friends. This one is to a friend of mine who was a journalist who had just started getting into golf and he was basically following me around the world, and he passed away a few months ago from Covid."

Rahm won his first PGA Tour title at Torrey Pines, where he also proposed to his wife Kelley. She and their infant son Kepa were the first to greet Rahm after his dramatic birdie on the 18th.

"I'm a big believer in karma, and after what happened a couple weeks ago I stayed really positive knowing good things were coming," Rahm said.

"I didn't know what it was going to be, but I knew we were coming to a special place, I knew I got my breakthrough win here and it's a very special place for my family.

"The fact that my parents were able to come, I got out of Covid protocol early, I just felt like the stars were aligning, and I knew my best golf was to come.

"I have a hard time explaining what just happened because I can't even believe I made the last two putts, and I'm the first Spaniard ever to win a US Open.

"This was definitely for Seve (Ballesteros). Usually we think a lot about him at the Masters, but I know he wanted to win this one most of all."

Oosthuizen had already finished second in each of the four majors before being runner-up in last month's US PGA and was left to rue a pulled drive into a hazard on the 17th.

"It's frustrating. It's disappointing," the former Open champion said. "I'm playing good golf, but winning a major championship is not just going to happen.

"You need to go out and play good golf. I played good today, but I didn't play good enough.

"I definitely left a few putts or shots out there. I took the tee shot on at 17, and I knew it was a crucial hole for me to take it on and give myself a birdie opportunity.

"I didn't pull it off, but standing on that tee again, I'll probably do the same thing, taking a driver and taking the shot on. I feel like I had my shots, I went for it, and that's what you have to do to win majors. Sometimes it goes your way and other times it doesn't."