BOSTON — For much of the first half of the season, Gleyber Torres coming up in the ninth and representing the tying run would have been reason for the Yankees to like their chances.

When it happened Saturday, there was a lot less cause for optimism.

In the midst of his third straight game without a hit, the rookie second baseman managed to draw a walk against Red Sox closer Craig Kimbrel to load the bases with two outs.

Greg Bird, though, followed by flying out to center to end the game, as the Yankees lost a season-high fourth consecutive game, 4-1, at Fenway Park.

And among the culprits has been Torres, who has not been nearly as productive since missing three weeks with a strained hip last month.

In 38 plate appearances over 10 games, he’s 6-for-33 with three extra-base hits and 11 strikeouts.

It’s a far different result than he had for much of his first two-plus months in the majors.

After returning from the disabled list, the 21-year-old has shown some flaws, both in the field and at the plate.

There was the baserunning gaffe against the Royals last Saturday, a pair of defensive misplays against the Orioles on Wednesday, and then he failed to knock down Mitch Moreland’s single to right-center that scored a run Friday.

Of course, he homered twice in the game against Baltimore on Wednesday, including a three-run homer in the bottom of the ninth that briefly gave the Yankees some hope before they dropped the game to the lowly Orioles.

Overall, though, the second half has not been good for Torres or the Yankees.

“Sometimes I try to make plays and I don’t,’’ Torres said of his recent woes. “I’ve missed a couple plays and I feel bad. I just try to be professional, but I’m human and I’m trying to get better.”

On Saturday, at least, Torres didn’t add to his list of mental lapses, but he hit into a double play, flied to center and struck out against former Yankee Nathan Eovaldi. And he’s now 0-for-9 with two walks in the series.

“We’re facing a really good team right now in Boston,’’ Torres said. “We lost a couple of games, but it’s a good test. I’m focused on doing my job. I just have to forget what’s happened and just play better.”

Manager Aaron Boone hasn’t held back in his criticisms of Torres, but he’s also been careful in saying that he doesn’t want him to lose the flair with which he plays the game.

Torres looks to be trying to figure out how to balance the two sides.

He insists he feels fine physically and that his hip is not an issue.

“I feel good,’’ Torres said. “The first games back, I felt rusty at the plate, but that went away. Now, I have to get back to hitting better.”

As the league adjusts to what Torres does well offensively, he’ll have to adjust back. It’s a process he’s already started.

“I try not to change anything I’m doing,’’ Torres said. “They’re not pitching me that differently. It’s not a big deal. It’s just about me getting more experience.”