DENVER (AP) -- Freddy Galvis swung his way out of a three-week slump and helped the Philadelphia Phillies mount their biggest comeback of the season.
Galvis hit a pair of 2-run triples and scored the go-ahead run on Humberto Quintero's single, rallying the Phillies a five-run deficit for an 8-7 win over the Colorado Rockies on Friday night.
''You have to stay confident,'' said Galvis, who came into the game batting .152 (12 of 79) since hitting a game-ending homer May 19 against Cincinnati. ''It's a long season. You have to keep your head up and play hard every day.
''Hopefully, I'll keep swinging good and help the team. Sometimes, that's the kind of game you need to get back on track. We'll see tomorrow.''
The Phillies overcame home runs by Carlos Gonzalez and Josh Rutledge, who was recalled from Triple-A Colorado Springs on Friday to fill the roster spot left vacant by the loss of slugging shortstop Troy Tulowitzki to a broken rib.
Tulowitzki, who could miss up to six weeks, was placed on the disabled list Friday, a day after he was hurt diving for ball during a 5-4 loss to Washington.
Trailing 7-2 going into the sixth, the Phillies chased Rockies starter Juan Nicasio and pulled within 7-5 on the first of Galvis' 2-run triples and a run-scoring groundout by Quintero.
''The ball was up in the zone and not doing anything,'' Nicasio said. ''I had a lead, but they're hitting and swinging.''
The Phillies went ahead with a three-run seventh. Domonic Brown singled off reliever Josh Outman to start the inning and after Ryan Howard struck out, Wilton Lopez relieved Outman. Lopez (1-3) got Kevin Frandsen to fly out, but John Mayberry walked and Galvis shot a hard grounder down the first base line for his second triple of the night, scoring Brown and Mayberry to even the score at 7-all.
Quintero singled Galvis home to give the Phillies their first lead.
''It's always tough,'' Gonzalez said of the Rockies losing their big lead. ''It's one of those things that you hope doesn't happen during the game when you're playing defense. Just a bad couple of outings, just a bad game.''
Galvis said the Phillies never believed they were out of it, even when they were down by five. A 2-run deficit was the biggest previous comeback by the Phillies, which they pulled off twice this season.
''This is a park where the ball flies,'' Galvis said. ''You've just got to keep hitting and we got'em.''
Jonathan Papelbon gave up a one-out single in the ninth to Gonzalez, who went 4 for 4, but he came back to strike out Michael Cuddyer and retire Todd Helton on a groundout for his 13th save in as many chances. Michael Stutes (2-0) pitched a scoreless inning in relief for the win
Gonzalez, who bruised his left foot Thursday when he was struck by a foul liner while waiting in the on-deck circle, gave the Rockies the lead when he connected off Kyle Kendrick in the first for his 19th home run.
Gonzalez's solo shot was the first of seven runs Kendrick gave up, matching his career high. He went 4 1-3 innings and allowed 10 hits.
''I was just up in the zone tonight, really up all night,'' Kendrick said. ''I couldn't make a pitch, but the offense picked me up. The bullpen pitched well. It was a nice win.''
Nicasio helped build a 7-2 lead for Colorado with a two-run single in the second, his first RBI of the season.
The Phillies closed to within 3-2 in the fourth on Mayberry's RBI double and Quintero's RBI single. But the Rockies answered in their half of the fourth. Yorvit Torrealba hit a one-out run-scoring double. One out later, Rutledge drove a 1-1 offering from Kendrick over the wall in right-center into the Rockies bullpen for his sixth home run of the season.
Nolan Arenado's RBI single in the fifth chased Kendrick.
Nicasio went 5 2-3 innings and allowed five runs on seven hits.
NOTES: Phillies C Carlos Ruiz (right hamstring strain) was scheduled to begin a rehab assignment on Saturday with Lehigh Valley. ... Cuddyer's fifth inning single extending his hitting streak to 12 games, longest by a Rockies player this season.