"In the end, we had just enough runs," Black said.
The Padres scored four runs in the sixth inning off Hernandez while their own pitcher, Clayton Richard, allowed one run in seven innings for his first road victory since July 4, which was the last start he made before having shoulder surgery shortly thereafter.
"It seems like it's been a while," Richard said.
Richard (3-7), who hadn't won since May 16, allowed eight hits with one walk and three strikeouts. He got his usual bevy of ground-ball outs, 10 of them to be exact.
He benefited greatly from a diving catch from Will Venable in right field in the second inning and then two strong plays at third base by Chase Headley on tough ground balls in the fifth and sixth.
"Our defense did a great job. ... All around, our guys played a tremendous game," Richard said.
Headley made a nice play to end the fifth inning with a runner on third, coming in to get a ball off the bat of Ichiro Suzuki for the final out. Then, to start the sixth, he made a nice play on a ball to his left to get Dustin Ackley at first base.
"You have got to be on your toes because you know you're going to get a lot of action over there with Clayton on the mound," Headley said.
Hernandez, making his first appearance in a game since June 1 because of a sore back, allowed six baserunners over the first three innings but allowed just one run in that stretch.
In fact, Hernandez looked like he was picking up steam when, after allowing a triple to Chris Denorfia to start the fourth inning, he retired the next six hitters he faced heading to the sixth.
Hernandez (4-5) wasn't nearly as fortunate in that inning, though. He walked Carlos Quentin to start the sixth and then allowed a bloop single to Yonder Alonso. Two batters later, Cameron Maybin singled in a run. The next batter, Nick Hundley, did the same, pounding a pitch into right field to make it 3-1.
"We strung together a bunch of quality at-bats. It's a testament to us for grinding through some at-bats against a guy with Cy Young stuff," Hundley said.
Black liked the production from the bottom of the order in that inning.
"That was big tonight to get that from those guys," he said.
The Padres (21-41) got another run when Hernandez spiked a pitch that rolled to the backstop on a wild pitch. Finally, Everth Cabrera, the Padres' No. 9 hitter, tripled to the gap in right-center field for a 5-1 advantage.
"I'm tired of pitching like this," said Hernandez, who allowed five runs on nine hits in six innings. "I've got to do something about this. I've got to pitch better. I feel like I can do more than I did today."
The Padres, after getting four outs from reliever Luke Gregerson, had a tough time thereafter. After Joe Thatcher allowed a solo home run to Michael Saunders and a double to Chone Figgins in the ninth inning, closer Huston Street came on. Street give up an RBI single to Munenori Kawasaki and a single to Suzuki before striking out Ackley. The pitch got away from Hundley, however, allowing Kawasaki to score and Ichiro to move to second with the potential tying run. But Street stopped the bleeding by getting Jesus Montero to ground out to end the game.