One of the unfinished pieces of business on Sandy Alderson’s desk after the nonwaiver trade deadline was the need to acquire a reliever or two to help Addison Reed and Jeurys Familia nail down games.

A seventh-inning guy, if you will.

For now, that guy is Hansel Robles. Called in to protect a one-run lead on Tuesday night, Robles gave up three runs to the Diamondbacks and the Mets went on to a 5-3 loss before 31,884 at Citi Field.

Citi Field was buzzing after the red-hot Neil Walker hit a go-ahead two-run home run to right-center off Zack Greinke in the sixth inning.

The Mets were trailing 2-1 when Walker — who hit the eventual game-winning two-run homer in the ninth inning on Sunday in Detroit — followed Curtis Granderson’s leadoff double with his 20th home run of the season.

Walker (3-for-4), a free agent after the season who Alderson said before the game he would like to re-sign, is batting .491 (26-for-53) with four HRs and 11 RBIs in his last 13 games.

advertisement | advertise on newsday

But Robles (5-4) allowed a two-out, two-run triple to Michael Bourn in the seventh to give the Diamondbacks a 4-3 lead. Manager Terry Collins left Robles in to face the lefthanded-hitting Bourn instead of calling in Jerry Blevins.

Collins cited the numbers: Bourn went into the game batting .358 vs. lefties and Robles had held them to a .185 average.

“It was a pretty good matchup,” Collins said. “He just didn’t make the pitch . . . He’s been so good. You think you’ve got the perfect setup . . . Just didn’t get it done.”

Paul Goldschmidt followed with an RBI single off Robles to give the last-place team in the NL West some insurance.

Steven Matz overcame a 28-pitch first inning to throw six innings and a career-high 120 pitches. He allowed two runs and five hits with one walk and nine strikeouts (tying a career high) and was in line for the win when Walker went deep.

Mets videos

“Obviously, the first inning killed him,” Collins said. “I thought after that he settled down and started making pitches.

With the Mets leading 1-0 on James Loney’s first-inning RBI groundout, Matz allowed a leadoff home run to Brandon Drury in the second. Goldschmidt gave the Diamondbacks a 2-1 lead with an opposite-field shot in the sixth.

After Walker’s homer, Arizona pitchers retired 13 of the final 15 batters. The only hit was a two-out, eighth-inning single by — who else? — Walker. But Enrique Burgos struck out Jay Bruce to end the inning.

In the ninth, Alejandro De Aza appeared to beat out a one-out chopper to third, but the safe call was overturned on a replay review. Rookie closer Jake Barrett walked Michael Conforto, but retired pinch hitter Ty Kelly on a grounder to short for his fourth save.

The Mets are in another one of those “crucial stretches” managers talk about. Starting on Tuesday, they face two of the worst teams in baseball exclusively for nine consecutive days. It’s Arizona, then San Diego, then at Arizona.

advertisement | advertise on newsday

“This is the time of the year that you have to get on a roll,” Walker said. “April and May are months that it you don’t play great, you can make up for it. I haven’t been on a team that made the playoffs that hasn’t been good in August.”

The Mets are 3-5 in August. They have not won consecutive games since July 6-7.

“Kind of like it’s been one step forward and two steps back for us,” Walker said. “But we’re playing hard. This is a hard time of year.”