For a pitcher whose primary responsibility is to prevent comebacks from happening, Héctor Neris has gotten rather good at authoring his own.

In 2018, for instance, after being removed as the Phillies’ closer and demoted to triple A, he returned six weeks later to strike out 35 of 69 batters over his last 20 appearances. Last season, he fumbled the closer’s job again only to post a 1.23 ERA over his next 15 outings and reemerge as manager Joe Girardi’s most trusted reliever, albeit in a historically bad bullpen.

It shouldn’t come as a surprise, then, that Neris is in the midst of yet another midsummer revival.

Entering Tuesday night’s series opener at home against the Los Angeles Dodgers, he hadn’t yielded a run in 13 of 14 appearances, including seven in a row. He went two innings in four of those games. Since July 5, he held opponents to a .155 batting average (9-for-58) with five walks, stranded 87.3% of baserunners, and had a 1.62 ERA in 16⅔ innings, tied for third among National League relievers behind Arizona’s Matt Peacock (23) and the Mets’ Drew Smith (18).

» READ MORE: Is Bryce Harper the MVP front-runner? The Phillies’ star is making a strong case.

In the search for reasons why the Phillies won eight consecutive games — their longest streak since 2011 — and gained a two-game lead in the NL East, Neris’ resurgence rates as one of the most consequential.

“He’s been a big key to this,” Girardi said. “He has. He’s had a couple two-inning stints for us, I think he even closed a game through all this. He’s played a bunch of different roles. But Héctor’s been through this before a bunch of different times in his career, where he has a tough month and he always finds a way to come back and pitch really well.”

Somehow, though, this comeback feels more striking. Maybe it’s because of how dispirited Neris looked in the ninth inning of an 11-1 blowout on the Fourth of July. He faced eight batters that day at Citizens Bank Park against the San Diego Padres and gave up six runs — more than in any of his 379 career appearances — on two walks and four hits, including a three-run shot by a 31-year-old rookie catcher named Webster Rivas, who was batting .205 at the time.

It was a spectacular meltdown even for Neris, whose lowest points over the years have tended to produce pyrotechnics. And his body language was the 180-degree opposite of the fist-pumping spasm that he let out after Jean Segura’s backhanded play ended the seventh inning on Friday night.

“What happened [July 4] is away, and I don’t think about it,” Neris said. “I just stay positive and work with what I have and stay in the season, try to help the team.”

Girardi did what he could to help rebuild Neris’ confidence. Neris’ first two appearances after the Padres nightmare came at Wrigley Field when the Phillies were leading by six runs and eight runs, respectively. He came into a one-run game in the fifth inning on July 10 at Fenway Park and got dangerous J.D. Martinez to roll a grounder for a double play.

But Neris made changes, too. Over the years, he has thrown mostly a four-seam fastball and his signature splitter. And through the end of May, when he had a 1.96 ERA and was 9-for-11 in save opportunities, 356 of his 383 pitches were either splitters (202) or four-seamers (154).

Perhaps Neris’ pattern became too predictable. Maybe it got too easy for hitters to pick out one pitch and tee off. He had an 8.22 ERA and four blown saves (in six attempts) in June, when Girardi put José Alvarado and eventually Ranger Suárez in the closer’s role. Phillies relievers blew a total of eight saves in 14 games from June 10-26, and while it was hardly all Neris’ fault, his struggles were a symptom of the bullpen’s unraveling.

Neris began mixing in his sinker more often, throwing it 21.7% of the time in June and 16.1% in July. He gave up eight hits with it, but all eight were singles. So he stuck with the pitch, and through Sunday, he hadn’t allowed a hit on 22 sinkers in four appearances in August. And 26.8% of his pitches this month have been sinkers.

It sure seems like Neris has grown to trust it.

“When you get the good result,” he said, smiling, “you like everything you do.”

Girardi hasn’t put Neris back into the ninth-inning role, and it’s doubtful that he will after the trade-deadline addition of Ian Kennedy. But Neris’ rebirth has strengthened the bullpen. With Neris, Archie Bradley (0.56 ERA in his last 15 appearances), and Kennedy, Girardi has three late-inning arms capable of closing and is able to use Alvarado in a conventional setup role or match him up against tough left-handed hitters.

» READ MORE: Phillies nearly got Kyle Gibson 2 years ago. An intestinal disorder steered him to the Texas Rangers instead.

Neris’ ability to throw multiple innings also has helped the Phillies withstand injuries to Sam Coonrod (forearm) and Connor Brogdon (elbow) and rookie left-hander Bailey Falter’s stint on the COVID-19 restricted list.

“He’s been able to get a ton of big outs for us over this last month,” Girardi said. “He went through a tough period. He kept working. They made some minor adjustments, and he’s throwing the ball exceptionally well for us right now. We got him back.”

Neris seems to have a knack for that.