"We needed that one, it was huge," said Eric Hosmer whose double started the winning rally.
Hosmer opened the 11th with a double to left field against right-hander Nick Vincent. Salvador Perez flied out to short right but Alex Gordon grounded a broken-bat single past second baseman Jedd Gyorko, scoring Hosmer,
"I don't care, it works," said Gordon, 0-for-4 until then. "It's been a long losing streak it seems like, so we just needed something to happen. Hoz did a great job of getting it going and I was just able to find a hole, so it works."
Gordon took second on the throw to the plate and scored when Billy Butler pinch-hit for pitcher Wade Davis and belted a double to the right-field wall.
"Obviously when you lose five straight, you're trying to break the schneid," Butler said. "We're a team that wins late in games usually. That's how we are. We ran into a hot team in Detroit over the weekend, we had a tough loss [Monday] night. But we played well tonight and pulled one out."
The Padres had beaten the Royals, 6-5, in 12 innings in the series opener Monday night.
Starting pitcher Jeremy Guthrie kept the Royals in a 1-1 tie through the first eight innings of this one. He gave up just four hits and the only run came on Yasmani Grandal's home run to right field in the fourth inning.
Guthrie gave an assist to the seaside city itself.
"My pitching was benefited by some great defense and some thick marine air that kept some balls that were really hit hard in the park and I thought the field and the conditions played to my advantage today," Guthrie said. "Frankly I think if I'd have been pitching somewhere else, it could've been very different."
Perez pulled the Royals even, 1-1, with his leadoff home run against left-hander Robbie Erlin in the sixth inning. It was his third and the Royals' 14th, still fewest in the Major Leagues.
There was some late-inning drama.
Shortstop Alcides Escobar, in addition to dazzling plays afield, put on a baserunning show in the Royals' ninth. With one out, he slid into first base to beat out an infield hit. Then, with Lorenzo Cain at the plate, Escobar stole second base and then third base as well.
"I'm trying to steal a base anywhere when I get on base," he said.
Then Escobar tried to surprise the Padres as Cain's pop foul was caught by first baseman Kyle Blanks beyond the bag. After the catch, Escobar bolted for home but Blanks got off a good throw to catcher Grandal and he was out.
"That was a hard play for a first baseman with his back to home plate," Escobar said.
Escobar had completed a rare circuit of the bases, sliding feet-first into first, second, third and home.
"The last few games he's been doing it all," Gordon said. "That was pretty impressive. It was a close play at home, too. I think that just shows you how bad we wanted this win. It was a good effort but they just made a good play."
"I was surprised the runner was going," Grandal said. "Kyle is an outfielder and for him, that was a pretty easy catch-and-throw. That was a huge play for us."
Manager Ned Yost decided not to challenge the umpire's call under the instant replay system.
"From our angle in the dugout, it looked like he got him and the report we got back, I just thought it was inconclusive," Yost said. "It was a great send, a great time to take a chance there and it was just a bang-bang play."
Yost said Escobar was stealing the bases on his own initiative.
"We give Esky the green light to pick his spots when he thinks he can do it," he said. "But legging out an infield hit, then stealing second and stealing third and then almost scoring the winning run on a pop-up to the first baseman. That would've been a nice story."
Davis took over for Guthrie in the ninth and struck out the side. He also pitched the 10th, giving up a leadoff single to Chris Denorfia. Then he struck out Blanks and got Alexi Amarista to ground into a lightning-quick double play started by second baseman Omar Infante.
"That was a life-saver right there, I was starting to get a little tired," Davis said.
After the Royals went ahead, closer Greg Holland arrived one night after blowing his first save. This time, though, he notched his eighth save. He struck out pinch-hitter Yonder Alonso, gave up a single to Will Venable who was thrown out trying to steal by Perez, then fanned Everth Cabrera.
The five-game skid was over. So was the decade-old drought at Petco Park.
"We needed this one, we need many more after this one as well," Guthrie said.