PHOENIX — Throughout spring training, Joe Girardi, though not exactly sounding the alarm, spoke of a potential problem for his team.

The Yankees’ back end of the bullpen was set, as good as it comes.

But those middle innings to get to Dellin Betances, Andrew Milller and Aroldis Chapman?

Unknown.

And so far this season, the search for dependable arms in those innings has not gone well, with Kirby Yates one exception.

It didn’t outright cost the Yankees in their 12-2 loss to the Diamondbacks on Monday night but a midgame implosion from the group turned a modest deficit into an insurmountable one.

advertisement | advertise on newsday

“At times it’s been a struggle,” Girardi said after the loss. “We need to find a combination that works.”

It did not work Monday.

After Chad Green allowed a three-run homer to Jake Lamb in the fifth that gave Arizona a 5-2 lead, Yasmany Tomas doubled.

In came Nick Goody, who had actually pitched very well this season but not on this night as he could not pick Green up. Brandon Drury flied to deep center, allowing Tomas to go to third, and Chris Herrmann’s sacrifice fly made it 6-2. Nick Ahmed, the No. 9 hitter, doubled with two outs and Robbie Ray, the pitcher, lined an RBI single to center to make it 7-2.

Game, for the most part, over.

Yankees videos

“I said it in spring training, I’m going to say it again, those are probably the most important innings,” Girardi said before Tuesday night’s game, one in which reinforcements arrived from the minor leagues.

Green and Conor Mullee, who allowed one run in relief Monday, were optioned to Triple-A Scranton/Wilkes-Barre and lefthander James Pazos and righthander Luis Cessa were recalled. Additionally, Phil Coke, who allowed four runs — three earned — Monday was designated for assignment and utility man Rob Refsnyder was recalled.

Cessa, 0-1 with a 4.18 ERA in six games (five starts) with Scranton this season, will be Girardi’s long man. The 24-year-old Cessa, acquired in the offseason along with Green from the Tigers for lefty reliever Justin Wilson, made the Yankees out of spring training but was sent down to be stretched out as a starter. Pazos pitched well last season for the big-league club — he did not allow a run in 11 appearances — but wasn’t good this spring training when given a chance to win a bullpen spot. But the 25-year-old has been mostly terrific for Scranton, posting a 2.35 ERA in 12 games.

As Giradi’s search for capable mid-inning relievers continues, one or both, if they perform, could earn prolonged stays.

“There’s two things it does,” Girardi said of finding reliable options. “Number one, it allows you, when you have the lead, to get to the big three. Number two, when you don’t have the lead, they can keep it close to where you can come back. And that’s probably even more important than the other.”

advertisement | advertise on newsday

During the long season, when starters will ebb and flow as to how long they last, solid middle relief can be the difference between a good team and an also-ran.

“Those guys are really important because a lot of people talk about you’re going to win 60 [games] and you’re going to lose 60, and it’s the other 40 [that determine] what happens,” Girardi said. “A lot of those times, those need to be come-from-behind wins, and you have to keep the score close to give your team an opportunity.”