PHILADELPHIA — Tommy Joseph hit a tying home run in the seventh inning and a winning single in the 11th, lifting the Philadelphia Phillies over Colorado 2-1 and stopping the Rockies from a four-game sweep Thursday.

Joseph homered off Tyler Anderson and lined the game-ending hit against Scott Oberg after Michael Saunders’ one-out double.

Jeanmar Gomez (3-1) pitched a hitless 11th is his return from a disabled list stint caused by an elbow injury. Philadelphia stopped a five-game losing streak, winning for the fifth time in 25 games. Colorado, which has the NL’s best record, had won four straight.

Trevor Story homered in the fourth off Vince Velasquez, who allowed eight hits in five innings and struck out seven. Three of the strikeouts were by major league hits leader Charlie Blackmon, who went 2 for 5.

Anderson gave up six hits in seven innings.

PIRATES 9, BRAVES 4: Ivan Nova pitched into the ninth inning, Adam Frazier hit a three-run homer and Pittsburgh won at Atlanta.

The Pirates split the four-game series after losing the first two. This one was easy after Pittsburgh put up five runs in the third inning, capped by Frazier’s third homer this season.

Nova (5-3) threw 100 pitches in 81/3 innings, giving up three hits in the ninth and missing out on becoming the first pitcher in the big leagues with three complete games this season. It was the first time in three career starts against Atlanta that he’s surrendered an earned run.

CUBS 5, GIANTS 1: Kris Bryant, Jason Heyward and Ben Zobrist hit solo homers, and Chicago won at home for its third straight victory.

Heyward went deep for the second time in three games and has a five-game hitting streak since a sprained finger in his right hand caused him to miss 12 games.

Zobrist added two singles as the Cubs took 3 of 4 games from the Giants and finished a 7-2 homestand.

PADRES 4, METS 3: Dinelson Lamet overpowered the Mets in his major league debut as San Diego won at New York.

Lamet cruised through five innings of one-run ball. He struck out eight and surrendered just three hits, including Lucas Duda’s solo homer in the second.

Brad Hand allowed a run but got the save.

AMERICAN LEAGUE

RAYS 4, ANGELS 0: Matt Andriese allowed six hits over eight innings, Colby Rasmus drove in four runs and Tampa Bay won at St. Petersburg, Florida, to salvage a split of a four-game series.

Andriese (5-1) improved to 4-0 over his last five starts, holding the Angels to 1 for 11 with runners in scoring position. Los Angeles threatened in five innings against him.

INTERLEAGUE

MARINERS 4, NATIONALS 2: Nelson Cruz greeted reliever Jacob Turner with a go-ahead, three-run homer in the sixth inning, and Seattle won at Washington to stop a five-game losing streak.

Gio Gonzalez took a 2-0 lead into the sixth, when Jean Segura singled leading off and Guillermo Heredia took a called third strike. That prompted Seattle Manager Scott Servais to complain, which led to his ejection.