By Sam Bush

Phils shortstop Didi Gregorius has had an up-and-down year.

As his .214 batting can attest.

But he also has 13 homers and 52 RBI’s in a season when he has missed more than 50 games, mostly due to injury.

However, he has had his clutch moments.

Such as last night, when he smoked a three-run home run in the seventh inning as the Phillies pulled closer to first place in the NL East with an 8-6 victory.

The Phillies (80-74) moved within 1 1/2 games of first-place Atlanta after the Braves split two games in San Diego. They also trail St. Louis by five games for the second and final NL wild card with eight games left.

The Phils bullpen tied a major league record with its 34th blown save, but the team still won its fourth straight and eighth in 10 games.

Brad Miller and Phillies starter Kyle Gibson also went deep, Hector Neris (4-6) pitched 1 2/3 scoreless innings and Ian Kennedy earned his 26th save and 10th since joining the Phillies at the trade deadline with a scoreless ninth.

After Pittsburgh took a 6-5 lead in the seventh on Wilmer Difo’s pinch-hit drive against Cam Bedrosian, the Phillies went ahead in the bottom of the inning.

Bryce Harper, serenaded with “M-V-P! M-V-P!” chants from the 20,548 in attendance, led off with a walk. After two outs, Andrew McCutchen hit a dribbler down the third-base line that stayed fair for an infield hit.

Gregorius followed by sending on an 0-1, 80-mph slider from Chasen Shreve (3-2) over the wall in right.

“Just tried to stay on the heater and react to everything else,” Gregorius said.

It was the 13th homer of the season and second in two nights for Gregorius.

“Huge, that’s a huge hit,” Phillies manager Joe Girardi said. “Everyone needs to contribute and that’s what’s going on right now.”

Neris avoided blown save No. 35, but it wasn’t easy. He wriggled out of a bases-loaded jam in the eighth by getting Ke’Bryan Hayes to ground out. Neris fielded the grounder, pumped his fists, jogged to first base himself and stomped on the bag with both feet before celebrating.

Girardi made a mound visit prior to Hayes’ at-bat with the intention of removing Neris, but the right-hander convinced his manager to let him stay.

“Hector has been so clutch for us,” Girardi said. “He’s a guy that is just really tough. He is a tough kid that is durable. He’s a warrior to me. I have the utmost respect for him. He said, ‘I got this.’ I said, ‘OK, this is your last guy.'”

Said Neris, “I wanted that.”

Philadelphia went ahead in the sixth with a pair of runs. McCutchen scored on a wild pitch to tie it at 4 before Ronald Torreyes made it 5-4 with a pinch-hit RBI single to center. It was the second straight night in which Torreyes had a go-ahead hit after a three-run homer in the sixth inning of Philadelphia’s 12-6 comeback victory over the Pirates on Thursday night.

“Our guys grinded through at-bats and did a good job, but we came up short,” Pirates manager Derek Shelton said. “It’s good for our group. They need to play in games like this and feel the atmosphere like it was here tonight.”