James Hahn beat Roberto Castro with a par on the first hole of a sudden-death playoff Sunday in the Wells Fargo Championship to snap a three-month slump.

Hahn, who failed to make the cut in his previous eight tournaments and hadn't shot a round in the 60s since February, made a 4-foot putt on the par-4 18th to win his second career PGA Tour title.

Castro's tee shot on the playoff hole found the creek on the left side of the fairway and his third shot landed in a spectator's shoe on the side of the green, leading to a bogey.

Hahn bogeyed the 18th in regulation for a 2-under 70, and Castro had a 71 to finish at 9 under, one shot ahead of Justin Rose (71). Hahn also won the 2015 Northern Trust Open at Riviera.

Rory McIlroy and Phil Mickelson both shot 66 to tie for fourth at 7 under with third-round leader Rickie Fowler (74) and Andrew Loupe (71).