PEBBLE BEACH, Calif. (AP) In front of Gary Woodland was a 263-yard shot to the scariest green on any par 5 at Pebble Beach, especially with a U.S. Open on the line. Behind him by one shot on the leaderboard was Brooks Koepka, the most dangerous figure in major championship golf these days.

The safe shot was to lay up on the 14th and take his chances with a wedge

"The idea was to play for the win," Woodland said.

With an extra boost of confidence from his caddie - Brennan Little, who was on the bag for Mike Weir in his Masters victory - Woodland delivered the shot of his life with a 3-wood that narrowly cleared a bunker, settled on the edge of the green and set up a birdie that gave him the cushion he needed.

The rest was pure theater - a 90-foot pitch off the 17th green he nearly holed, a 30-foot birdie putt on the final hole for a 2-under 69 and a three-shot victory that denied Koepka's bold bid to match a century-old record with a third straight U.S. Open.

Woodland's pitch across the 17th green over a hump that checked and trickled to tap-in range effectively clinched it, taking its place with other big moments on the 17th green in the U.S. Open such as Jack Nicklaus and his 1-iron off the pin and Tom Watson's chip-in birdie. It even got the attention of Nicklaus.

"Took a lot of guts," Nicklaus said on Twitter.

Woodland had that it abundance, along with a message from an inspirational friend.

"You got this."

Until Sunday, when he cradled the silver trophy at Pebble Beach, Woodland got more attention from one hole in a pro-am at the Phoenix Open. He was gracious and encouraging to Amy Bockerstette, a 20-year-old with Down Syndrome and sheer optimism. Woodland invited her to hit a shot on the par-3 16th (into a bunker). He wanted to blast it out of the sand but she said, "I got this." She hit it out to 8 feet and made the putt. The PGA Tour-produced video has more than 20 million views.

"I told myself that a million times today," Woodland said. "I've got this."

Koepka didn't make it easy, keeping the pressure on Woodland until the very end.

Both represent the modern athlete in golf. Both are unflappable.

Needing three putts to win, Woodland finished in style. He raised both arms in the air to salute the crowd, turned toward the Pacific and slammed down his fist.

"I never let myself get ahead," Woodland said. "Once that went in, it all came out of me. It's special to finish it off here at Pebble Beach."

Koepka had to settle for a footnote in history. He closed with a 68, making him the first player with all four rounds in the 60s at a U.S. Open without winning.

"It was awesome to come this close to going three in a row. It's incredible," Koepka said. "I didn't really think about it until I was done on 18 and realized how close I actually was to not making history, but tying it, I guess you could say. Just wasn't meant to be this week."

Distance was no problem for Woodland on the 14th hole. It was the potential outcome.

"Left is not good, right is out-of-bounds, long is not ideal and the bunker speaks for itself," Woodland said. "So to execute that shot under the pressure, under the situation, that shot gave me the confidence. I felt better after hitting that shot on the golf course today than I had in a long, long time."

He believes it allowed him to hit one just as good on the 17th.

Woodland dropped the 5-iron from his hands when it sailed well to the right of the green with the pin 90 feet away over a hump.

Up ahead on the par-5 18th, Koepka drilled a 3-iron just over the back of the green, leaving him a 50-foot chip for eagle to tie, with a birdie likely to do the trick considering what Woodland faced on the 17th. Koepka chipped to 10 feet and narrowly missed the birdie putt.

Woodland, unable to hit putter and get anywhere near the hole, opted to pitch it with a 64-degree wedge. He clipped it perfectly just over the hump, and it checked about 12 feet from the hole and trickled by the pin to secure par, and effectively the U.S. Open.

"I was just trying to get it over that hump," Woodland said. "I thought it had a chance to go in, but it's not one I want over."

Woodland played conservatively down the 18th and made one last birdie that only mattered in the record book. He was aware that Tiger Woods had a 12-under 272 during his historic rout at Pebble Beach in 2000, and he topped him.

That birdie put him at 13-under 271 and earned him $2.25 million, the richest payoff in golf.

The difference was Woods won by 15 shots and was the only player under par. With a marine layer blocking the sunshine, and no significant wind at Pebble Beach all week, 31 players finished under par.

Koepka started four shots behind in his bid to join Willie Anderson as the only players to go back-to-back-to-back in the toughest test in golf. He made up ground quickly with four birdies in five holes.

"I felt like, `We've got a ball game now,'" Koepka said.

He failed to get up-and-down from a bunker for birdie on the par-5 sixth, and missed a 6-foot birdie putt on the par-3 seventh. Still, he stayed within range, just like he wanted, knowing that anything could happen on the back nine of a U.S. Open.

Something wonderful happened to Woodland.

"Gary played a hell of a round today," Koepka said. "Props to him to hang in there. To go out in style like that is pretty cool."

Of the four other players who had a shot at three straight U.S. Opens, no one came closer than Koepka. He now has a victory in the PGA Championship and runner-up finishes in the Masters and U.S. Open.

Justin Rose was the only one who caught Woodland all day, with a birdie on the opening hole. Rose bogeyed from the bunker on No. 2 as Woodland birdied, and he never caught up. Rose fell out of the race with three bogeys in a four-hole stretch on the back nine. He shot 74 and shared third with Xander Schauffele (67), Jon Rahm (68) and Chez Reavie (71).

Woods birdied six of his last 12 holes and was never a factor. He tied for 21st, 11 shots behind.

More AP golf: https://apnews.com/apf-Golf and https://twitter.com/AP-Sports