SAN DIEGO — Pinch-hitter Matt Szczur’s home run couldn’t have come at a better time for Jhoulys Chacin and the San Diego Padres.

Szczur hit a go-ahead home run in the seventh inning while batting for Chacin and the Padres beat the Kansas City Royals 6-3 on Friday night to snap a five-game losing streak.

Chacin (5-5), who improved to 3-1 this season at Petco Park, had given up a tying, two-run homer to Salvador Perez in the fifth.

“It was definitely awesome,” Szczur said. “He’s been pitching really great lately, especially at home. He made probably one mistake tonight, and Salvador took advantage of it. He pitched very well tonight. It was rewarding to pick him up at the end there.

“It was pretty cool. I’ve been grinding lately, so it definitely picks me up, picks the team up,” Szczur said.

Szczur said bench players “are more loose than guys think we are. We’re in there every other inning, we’re in the gym just to stay loose so when we have that opportunity we can take advantage of it.”

Szczur’s second homer came off rookie lefty Matt Strahm (1-3) and gave San Diego a 3-2 lead.

“That was big, especially with the mistake I made,” Chacin said. “I wasn’t thinking if I win the game, I wanted us to win the game. I was happy that we could win the game.”

Szczur went 0 for 3 the day before.

“Matt hasn’t had a ton of opportunity lately,” manager Andy Green said “He flushed that pretty quickly, got in there today, took a good swing and that’s a huge go-ahead home run.”

Rookie Franchy Cordero had a pinch-hit -run double in the eighth off reliever Chris Young, a former Padres starter, and Yangervis Solarte followed with an RBI single.

Chacin allowed two runs and three hits in seven innings, struck out two and walked two. Brandon Maurer came on with runners on first and second and no outs in the ninth and gave up Mike Moustakas’ sacrifice fly before getting Alcides Escobar to hit into a double play to earn his 10th save.

Royals starter Eric Skoglund lasted only 1 1/3 innings, allowing two runs and seven hits.

Chacin held the Royals hitless until Eric Hosmer singled to right leading off the fifth. Perez followed with a homer into the second deck in left. It was his 94th as a catcher, breaking Mike Macfarlane’s club record. Overall, Perez has 99 homers, including 12 this year.

“I didn’t even know. Somebody told me,” Perez said. “It feels pretty good for me, something which I’ll never forget.”

Perez also hit a two-run homer in the All-Star Game at Petco Park on July 12. Hosmer homered in that game as well and was named MVP.

Chacin helped his cause when he doubled in Erick Aybar in the second to make it 2-0. Aybar was aboard on a double off Skoglund. Chacin advanced to third and was picked off.

Austin Hedges hit an RBI single in the first.

“They were just on him,” Royals manager Ned Yost said about Skoglund. “They were just having good swings on him.”

Skoglund said he was leaving too many pitches over the middle of the plate “and they were able to barrel the balls up and that was about it. I wasn’t getting ahead. That’s the bread and butter right there, so if you don’t get ahead you’re going to get hit and that’s what happened.”

Before the game, the Padres optioned third baseman Ryan Schimpf to Triple-A El Paso and recalled right-hander Jose Valdez. Schimpf was hitting just .158 but had a team-high 14 homers among his 26 hits.

TRAINER’S ROOM

Padres: RHP Jered Weaver, on the disabled list with an inflamed left hip, threw a bullpen session. Manager Andy Green said the team will decide Saturday whether Weaver will throw another bullpen session or go on a rehab assignment.

UP NEXT

Royals: RHP Ian Kennedy (0-6, 5.33) is winless in his last 14 starts since his last win on Sept. 11. He pitched for San Diego from 2013-16.

Padres: Rookie RHP Miguel Diaz (1-1, 7.50) is scheduled to make his first career start. He’s made 21 relief appearances.


More AP baseball: https://apnews.com/tag/MLBbaseball