Bryce Harper's go-ahead RBI single was one of 15 hits the Philadelphia Phillies used to beat the Pittsburgh Pirates 6-1 on Friday night, giving them back-to-back victories for the first time since July 2.

Harper hit a seventh-inning single off Pirates reliever Richard Rodríguez (3-4) that scored pinch-hitter Brad Miller to give the Phillies their first lead of the game.

Rookie outfielder Adam Haseley added a solo homer to start the scoring and a run-scoring double to cap it for the Phillies.

Philadelphia Phillies' Adam Haseley drives in a run with an RBI-double off Pittsburgh Pirates relief pitcher Clay Holmes during the ninth inning of a baseball game in Pittsburgh, Friday, July 19, 2019. (AP PhotoGene J. Puskar)

Philadelphia Phillies' Adam Haseley drives in a run with an RBI-double off Pittsburgh Pirates relief pitcher Clay Holmes during the ninth inning of a baseball game in Pittsburgh, Friday, July 19, 2019. (AP PhotoGene J. Puskar)

Miller reached on a single to left and advanced on a walk and fielder's choice to set the table for Harper, who finished 2 for 5 with a double. The run snapped a 19-game scoreless streak for Rodríguez.

Philadelphia made it 3-1 in the eighth inning on Jean Segura's bases-loaded infield single that followed a 13-pitch battle with reliever Kyle Crick.

In the ninth, Maikel Franco drove in J.T. Realmuto with another infield single, César Hernández scored on a wild pitch and Haseley plated Franco with a double.

Philadelphia Phillies second baseman Cesar Hernandez, left, puts a tag on Pittsburgh Pirates' Colin Moran who singled off Phillies starting pitcher Jake Arrieta and was out advancing on the throw during the fourth inning of a baseball game in Pittsburgh, Friday, July 19, 2019. (AP PhotoGene J. Puskar)

Philadelphia Phillies second baseman Cesar Hernandez, left, puts a tag on Pittsburgh Pirates' Colin Moran who singled off Phillies starting pitcher Jake Arrieta and was out advancing on the throw during the fourth inning of a baseball game in Pittsburgh, Friday, July 19, 2019. (AP PhotoGene J. Puskar)

Haseley also hit a solo homer in the fifth inning, his second in two games.

The rally made a winner of Juan Nicasio (2-3), who pitched one-third of an inning in relief of starter Jake Arrieta. Arrieta worked 5 2/3 innings of one-run ball. He struck out four and allowed six hits.

Cole Irvin pitched two innings for his first save.

Pittsburgh Pirates first baseman Josh Bell (55) cannot handle the throw from third baseman Colin Moran as Philadelphia Phillies' Scott Kingery (4) reaches first with a single off Pirates starting pitcher Jordan Lyles during the fifth inning of a baseball game in Pittsburgh, Friday, July 19, 2019. (AP PhotoGene J. Puskar)

Pittsburgh Pirates first baseman Josh Bell (55) cannot handle the throw from third baseman Colin Moran as Philadelphia Phillies' Scott Kingery (4) reaches first with a single off Pirates starting pitcher Jordan Lyles during the fifth inning of a baseball game in Pittsburgh, Friday, July 19, 2019. (AP PhotoGene J. Puskar)

Pirates starter Jordan Lyles bounced back from his worst start of the season, striking out seven in 5 2/3 innings while allowing one run. In his previous start, he gave up seven runs and didn't get out of the first inning.

TRAINER'S ROOM

Pirates: RHP Trevor Williams had his scheduled start on Saturday scratched due to severe flu-like symptoms. . RHP Keone Kela (right shoulder inflammation) is expected to wrap up his rehab assignment with Triple-A Indianapolis this weekend.

Philadelphia Phillies' Adam Haseley rounds third after hitting a solo home run off Pittsburgh Pirates starting pitcher Jordan Lyles during the fifth inning of a baseball game in Pittsburgh, Friday, July 19, 2019. (AP PhotoGene J. Puskar)

Philadelphia Phillies' Adam Haseley rounds third after hitting a solo home run off Pittsburgh Pirates starting pitcher Jordan Lyles during the fifth inning of a baseball game in Pittsburgh, Friday, July 19, 2019. (AP PhotoGene J. Puskar)

ROSTER UPDATE

The Phillies agreed to a deal with left-handed pitcher Drew Smyly, who will be put into the starting rotation on Sunday, pending completion of a physical. Smyly was 1-5 with an 8.42 ERA in 13 games with the Texas Rangers earlier this season. He will take the place of Jake Pivetta, who was moved to the bullpen.

UP NEXT

Phillies: RHP Zach Eflin (7-9, 4.16 ERA) has allowed 13 earned runs over his last two starts and has dropped four of his last five decisions.

Pirates: RHP Joe Musgrove (6-8 4.31) will have his scheduled start moved up a day to fill in for Williams.

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP_Sports