PHILADELPHIA -- Aaron Altherr had quite a game for a guy who sat on the bench the first six innings.
Altherr's RBI single in the bottom of the 11th inning lifted the Phillies to a 3-2 victory over Pittsburgh on Sunday, giving Philadelphia its first four-game sweep over the Pirates in 24 years.
Andrew Knapp hit an opposite-field triple off the left-field wall with one out off Rich Rodriguez (0-1). With the infield in, Altherr pulled a 1-2 pitch to left for his third hit. He raised his hand in the air, ran to first and got mobbed by teammates.
"Feels great to have my first walk-off in the big leagues," Altherr said.
Altherr finished 3 for 3 with a triple, raising his average from .104 to .157. He's had to adjust to not being in the lineup every game because manager Gabe Kapler is rotating 10 players for eight starting spots.
"It's been really difficult as the days went on," Altherr said. "I'm trying to stay positive and keep rolling."
Kapler raved about Altherr's attitude.
"Coming into the season, we felt he was one of our best offensive players," Kapler said. "He's had some bad luck. I'm sure he wanted to play more regularly but every day he comes in with a smile, he comes prepared and he works his tail off. Good things happen to good people. He deserves it. His teammate behavior has been unparalleled. It's outstanding."
The Phillies have won 13 of 16 since a 1-4 start and are seven games over .500 for the first time since they were 24-17 on May 18, 2016. They finished 71-91 that season and lost 96 games last year.
Philadelphia had not swept a four-game series from the Pirates since May 12-15, 1994. Pittsburgh has lost four in a row and six of seven after an 11-4 start.
"We had opportunities throughout the game," Pirates manager Clint Hurdle said. "We had a rough week. We need a day off and figure things out and show up ready to play Tuesday."
Elias Diaz hit a two-run homer for Pittsburgh.
Pivetta gave up two runs and five hits, striking out seven in 6 1/3 innings.
After Diaz went deep to give the Pirates a 2-0 lead in the top of the fifth, Pivetta helped himself. He lined a run-scoring double down the right-field line -- his first career extra-base hit.
Pivetta scurried to third base on a wild pitch and hustled home on Cesar Hernandez's sacrifice fly that tied it at 2.
"I was just trying to get the two runs I gave up back," Pivetta said.
Phillies reliever Victor Arano had retired all 25 batters he faced this season and 32 straight, dating to last season, before Starling Marte reached safely on third baseman Scott Kingery's throwing error to start the ninth. Arano pitched out of a jam in the 10th after pinch-hitter Josh Bell hit a triple with one out.
Yacksel Rios (3-0) tossed a scoreless inning, stranding two runners, to earn the win.
Philadelphia's Odubel Herrera has reached base safely in a career-best 23 straight games.
Phillies: Reliever Tommy Hunter was activated from the disabled list. The righty had been sidelined all season with a strained right hamstring. He tossed a perfect eighth with one strikeout.
More AP baseball: https://apnews.com/tag/MLBbaseball
Colorado hosts Cincinnati following Gonzalez's strong showing
Cincinnati Reds (17-18, third in the NL Central) vs. Colorado Rockies (14-24, fifth in the NL West)
Dodgers face the Marlins following Urias' strong showing
Miami Marlins (17-20, fourth in the NL East) vs. Los Angeles Dodgers (20-17, third in the NL West)
Struggling Rangers look to break 3-game losing streak against Astros
Texas Rangers (18-21, fourth in the AL West) vs. Houston Astros (21-17, second in the AL West)
Oviedo expected to start for the Cardinals against Padres
St. Louis Cardinals (23-15, first in the NL Central) vs. San Diego Padres (21-17, second in the NL West)
Royals look to break 11-game losing streak against White Sox
Kansas City Royals (16-20, third in the AL Central) vs. Chicago White Sox (22-13, first in the AL Central)
Semien takes 12-game hit streak into matchup with Phillies
Philadelphia Phillies (20-18, second in the NL East) vs. Toronto Blue Jays (20-16, second in the AL East)