"That's an old school curveball," Padres manager Bud Black said. "It's top to bottom and he has a good feel for it. Not many guys throw it that way, which is a good thing."
Hahn's father, Fred, showed him the grip and he's thrown it the same way ever since.
"I'm throwing it for more strikes now," Hahn said. "I just kept throwing it and got comfortable with it. He showed me in high school. He taught me everything about football, basketball and baseball. He was a pretty good athlete himself."
Will Venable drove in two runs and Hahn (3-1) earned his third straight victory for the Padres, who won their fifth in the last seven games.
"We have a few more guys swinging the bat better," Black said. "We're getting the big hits."
Tim Hudson (7-4) lost for the first time at home this season, allowing six runs -- four earned -- on nine hits over 5 2/3 innings. He walked two and struck out four.
"I felt pretty good," Hudson said. "You have to give them credit. When I made a mistake, they were able to take advantage."
Hudson has allowed a combined 13 runs over his last two starts after giving up 19 over his first 13. Hudson was 6-0 in his first 11 starts against San Diego and has since lost three of four.
"He's elevating the ball more than he'd like," Black said. "His stuff and his pitches all look the same. It's probably location more than anything."
Hahn allowed his first earned run in 18 innings when Pablo Sandoval scurried home on Tyler Corbin's infield groundout in the fifth. He yielded two runs on four hits over six innings. Hahn walked one and struck out a season-high eight.
Hahn retired the first 12 hitters before giving up back-to-back singles to Sandoval and Michael Morse opening the fifth.
Amarista, 1 for 9 against Hudson entering the game, was hitless in his eight previous at bats, though he's 9 for 25 (.360) in his last eight games.
Cameron Maybin added two hits and drove in a run for the Padres.
Hudson got three double plays in the first four innings before a fifth-inning error on rookie Joe Panik, his second of the game, helped the Padres score twice to open a 3-0 lead.
Jake Gobbert, in his first start since being recalled Thursday, singled and Maybin was safe on Panik's miscue. Amarista doubled in a run and Venable, who hit a sacrifice fly in the third, drove in a run on a groundout.
"Those are the situations you have to find a way to push those guys across," Venable said. "The easy job is putting the ball in play after some great at bats."
Amarista singled home a pair of runs and Maybin delivered an RBI single. Tommy Medica added a pinch-hit home run, the first of his career, with two outs in the eighth.
Buster Posey doubled home a run in the bottom of the sixth to make it 6-2.
Padres RHP Andrew Cashner, on the DL with a sore shoulder, is expected to play catch on Friday in San Diego. ... The Padres lost a seventh-inning review on Brandon Crawford's infield single. The review lasted 2:09. . RHP Ian Kennedy (5-8, 3.90) starts Wednesday's series finale for the Padres. He's 7-3 with a 2.49 ERA in 18 starts against the Giants. . RHP Tim Lincecum (5-5, 4.90) makes the start for the Giants. He's 14-6 with a 2.47 ERA in 27 career starts against the Padres. ... Giants IF Brandon Belt (broken left thumb) ran the bases and will likely start his rehab assignment Thursday with the San Jose Giants. ... Giants OF Angel Pagan (back tightness) took batting practice and was to be re-evaluated to determine whether he would be in the lineup or put on the DL. He's missed eight straight games.