PHOENIX — Bring back the varsity.

After a recent 7-3 homestand, which included games against division-leading clubs such as the Red Sox and White Sox, the Yankees headed west to face two struggling teams, the Diamondbacks and A’s.

It did not start well.

Chad Green was beaten up in his big-league debut, the soft underbelly of the Yankees’ bullpen was exposed and Bomber bats reverted to their opening-month slumber in a 12-2 loss to the Diamondbacks in front of 32,718 at Chase Field on Monday night.

The Yankees (16-21), winners of eight of their previous 12 coming in, managed two runs and six hits against Arizona lefthander Robbie Ray, who came in 1-2 with a 4.84 ERA.

The 24-year-old Green, acquired along with Luis Cessa last December in the deal that sent lefty reliever Justin Wilson to the Tigers and getting the start with Luis Severino on the disabled list, allowed six runs — four earned — and eight hits in four-plus innings.

The righthander entered the fifth with the score tied at 2-2 but allowed a back-breaking three-run homer to Jake Lamb, who had three hits. The inning started with Michael Bourn attempting to bunt to get on. Green fielded and threw to first in time but Mark Teixeira dropped the ball for an error. Two batters later, Lamb launched a belt-high, full-count fastball to right to make it 5-2.

The Diamondbacks (18-23), who totaled 15 hits in snapping a five-game losing streak, added two more runs in the frame, including Ray’s RBI single off Nick Goody, to essentially put it away at 7-2.

They scored an unearned run in the seventh against Phil Coke and three earned in the eighth to make it 12-2. Nick Goody and Conor Mullee preceded Coke to the mound and allowed one run each.

The Yankees’ bright spots on offense were limited to Teixeira’s three hits and Jacoby Ellsbury’s fifth-inning triple that led to the tying run.

Paul Goldschmidt put Arizona on the board in the first with a two-out homer, his eighth of the season, on a first-pitch, 94-mph fastball.

The inning could have been far worse.

After the Goldschmidt homer, Lamb doubled into the gap in right-center and Yasmany Tomas reached on an infield single. With Brandon Drury at the plate, Tomas stole second. Drury then scorched a grounder to short, where former Diamondback Didi Gregorius made a nice stop to his right, then threw to first, where Teixeira scooped the low throw to end the 23-pitch inning.

The Diamondbacks tacked on in the second. Chris Herrmann led off with a single and stole second. Green struck out Nick Ahmed and got Ray to ground to short, which moved Herr mann to third. Jean Segura, who also had three hits, got ahead 3-and-1 before lining an RBI double to center, making it 2-0.

Ray responded with his first perfect inning of the night, a 14-pitch frame in which he struck out two.

The Yankees cut their deficit in half in the fourth. Teixeira led off with a double to left and went to third on Carlos Beltran’s sharp single to center. Chase Headley, coming off a 9-for-25 (.360) homestand, slapped an RBI single to right to make it 2-1. Aaron Hicks, coming off a 10-for-31 homestand, hammered a 3-and-1 fastball to dead center, deep enough to allow the runners to tag. Gregorius popped to short and Austin Romine was intentionally walked to get to Green.

The lefthanded-hitting pitcher, who struck out in the third in his first at-bat as a professional, got ahead 2-and-0 before taking two strikes and swinging at a third to end the inning.

The Yankees tied it in the fifth.

Ellsbury drove a 2-and-0 fastball to the deepest part of the park, right-center, and as he dove into third, the relay throw from Ahmed, the shortstop, pinged off his helmet and out of play. That allowed Ellsbury, who collected his second triple of the season, to come in to make it 2-2.