PHILADELPHIA (AP) — Aaron 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 lined 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.

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.

Phillies Improve To 8-1 At Home With 6-2 Win Over Pirates 

Elias Diaz hit a two-run homer for Pittsburgh.

Pirates starter Trevor Williams allowed two runs and only one hit — an RBI double to pitcher Nick Pivetta — in six innings. He had five walks and fanned seven.

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.

Sixers Top Heat 106-102, Simmons 1st Rookie To Have Playoff Triple-double Since Magic Johnson 

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.

(©Copyright 2018 by The Associated Press. All Rights Reserved.)