PITTSBURGH — Sean Rodriguez’s improbable weekend had a Hollywood ending.

Rodriquez homered in the 12th inning to give the Pittsburgh Pirates a 5-4 win over the San Diego Padres on Sunday. One day earlier, Pittsburgh acquired Rodriguez from the Atlanta Braves.

Rodriguez lifted a 1-1 pitch off Padres reliever Buddy Baumann (0-1) over the left-field wall.

“(The reception from the crowd) was pretty cool,” said Rodriguez, who spent the previous two seasons with the Pirates before signing with the Braves in November. “The fans showing me that much love, I definitely felt it. Deep down, I never felt like I stopped being a Pirate.”

A Jan. 28 car crash tore Rodriguez’s left rotator cuff, damaged his labrum and dislocated his biceps tendon. After undergoing surgery in February, he didn’t make his Braves debut until July 17.

Rodriguez hit .162 with two home runs and three RBIs in 15 games with Atlanta. He was 1 for 2 with the walk-off home run Sunday.

“We were looking for an opportunity to present itself to get him in and play,” Pirates manager Clint Hurdle said. “You heard the ovation. He got a lot of love when he came in the clubhouse. . You can write those things up. That’s what’s so great about sports.”

Rookie reliever Dovydas Neverauskas (1-0) pitched two scoreless innings to get his first career win.

The Pirates took two of three from the Padres after losing their past four series. Entering this series, Pittsburgh had lost eight of 11 since a six-game winning streak from July 16-21.

Pirates closer Felipe Rivero gave up two walks and a single to load the bases with two outs in the ninth inning before Manuel Margot’s two-run single tied the score 4-4.

Rivero has allowed four runs in his past three appearances after going 12 straight without allowing a run.

“(Rivero has) been the absolute best closer in the game all year,” Padres manager Andy Green said. “He hadn’t run into any trouble, but I think we had multiple at-bats in a row that he had to work for, that had a cumulative effect. Everybody’s human at some point in time.”

Pirates starter Jameson Taillon rebounded from allowing a combined 18 runs in his past two starts. He surrendered two runs, each coming in the first inning, and five hits with eight strikeouts in 6 1/3 innings.

Unlike Taillon, Padres left-hander Clayton Richard started strong before allowing four unearned runs in the third. He gave up five hits in six innings, but sent the Pirates down in order in the first inning and struck out the side in the second.

With the Pirates trailing 2-0 in the third, Andrew McCutchen cut the deficit in half with a single to left before a pitch hit David Freese to load the bases. Jose Osuna sent a double down the right field line, clearing the bases and giving Pittsburgh a 4-2 lead.

“I felt good throughout, really,” Richard said. “There were only a couple of pitches that got away from me and they were in that inning. I made a good pitch to Osuna. He did a good job putting the ball in play down the right field line.

“Pulled one to McCutchen that he did a good job hitting. You make a mistake to a guy like that and he’s going to take advantage. All in all, I felt good throughout.”

COSTLY MISTAKE

Spangenberg inadvertently jump-started the Pirates’ four-run third inning, which began with his error allowing Chris Stewart to reach first base safely. Stewart sharply hit a ground ball toward Spangenberg, who lifted his glove slightly too early and allowed the grounder to slip into the outfield.

ROSTER MOVE

Pirates: INF Max Moroff was optioned to Triple-A Indianapolis to make room for Rodriguez on the 25-man roster. Rodriguez entered the game as part of a double-switch with two out in the eighth inning.

UP NEXT

Padres: RHP Jhoulys Chacin (11-7, 3.99) will attempt to build off his last start when he takes the mound against Cincinnati on Monday. He pitched seven shutout innings and allowed three hits in a 3-0 win against Minnesota on Aug. 1.

Pirates: RHP Trevor Williams (4-4, 4.47) will look to string together a third consecutive strong start when he faces Detroit on Monday. Williams has been handed a no decision in his past two appearances, but has allowed a combined three runs.


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