CINCINNATI (AP) Kyle Farmer hit a tying homer in the bottom of the ninth inning and Tyler Stephenson drove in the winning run with a two-out single to rally the Cincinnati Reds past the San Diego Padres 5-4 on Thursday night.

Farmer smashed a shot to center field with one out against closer Mark Melancon (1-1), who then loaded the bases before Stephenson lined a 1-0 pitch down the right-field line.

''It was a cutter,'' said Stephenson, the Reds' rookie catcher. ''A simple swing, right field. My favorite one so far.''

Cincinnati salvaged the rain-delayed series finale and finally stopped the Padres, who had beaten the Reds six times in the past two weeks while winning 11 of 12 overall.

Manny Machado gave San Diego a 4-3 lead when he scored from second on a throwing error by rookie third baseman Alejo Lopez in the eighth.

Padres reliever Drew Pomeranz put two runners on in the Reds half of the eighth but got Joey Votto to fly out and Lopez to ground into an inning-ending double play.

Pinch-hitter Tommy Pham drove in two runs with a bases-loaded single in the Padres seventh to tie the score and chase Cincinnati starter Luis Castillo, who allowed three runs and five hits with six strikeouts in 6 1/3 innings.

Art Warren (1-0) pitched a scoreless ninth for the Reds.

''That was tough. Long night. We had to fight for everything we got,'' Padres manager Jayce Tingler said. ''We didn't execute in the ninth.''

Castillo pushed across the first Reds run in the second on a bases-loaded fielder's choice, and Jonathan India doubled home another. Aristedes Aquino had a run-scoring double in the Reds fifth.

The Reds snapped a six-game Padres winning streak against them this season.

''With all the losses, I still feel like we played them tough,'' Cincinnati manager David Bell said. ''To get a win there at the end, I thought that was deserving just from the standpoint that I thought we played them tough the whole time.''

SEEING STARS

A 52-minute rain delay in the fifth inning gave Bell the chance to announce to the Reds that right fielder Nick Castellanos and left fielder Jesse Winker were voted starters for the All-Star Game on July 13 at Coors Field in Denver. It will be the first All-Star appearance for both, as well as for Padres star Fernando Tatis Jr., who was voted the starting shortstop for the NL squad.

Tingler said Tatis also got the exciting news during the rain delay.

The last time two Reds outfielders started in an All-Star Game was 1956 when Gus Bell - grandfather of the Reds' manager - and Frank Robinson got the call for the NL.

Winker wept while talking to reporters about his selection.

''You know what, man? I never thought this could happen for me,'' he said. ''I'm very thankful.''

NO GENO

Reds regular third baseman Eugenio Suarez, who's hitting just .173, got a second night off after striking out four times against four different Padres pitchers in a 5-4 loss Tuesday night. Lopez, who made his major league debut Monday, again started in Suarez's place. He had four hits but committed the costly eighth-inning error.

TRAINER'S ROOM

Padres: Right-handed reliever Dan Altavilla announced on his personal Twitter account that he had Tommy John surgery. He made two appearances this season before going on the injured list.

Reds: RHP Michael Lorenzen was sent to the Arizona complex for a rehab assignment. Out all season with a shoulder strain, he could be back some time after the All Star break.

UP NEXT

Padres: Right-hander Chris Paddack (4-5) is scheduled to be on the mound Friday for the beginning of a three-game series at Philadelphia. Right-hander Zack Wheeler (6-4) is set to start for the Phillies.

Reds: Host the Cubs for a weekend series. Right-hander Sonny Gray (1-4), coming off the injured list and a rehab stint in the minors, is expected to start the opener Friday against Chicago right-hander Alec Mills (3-1).

---

More AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP-Sports

---

Follow Mitch Stacy at http://twitter.com/mitchstacy

Copyright 2021 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.