PHOENIX — Chris Herrmann and the Diamondbacks made it another long day for the sinking New York Mets.

Herrmann homered off Rafael Montero leading off the 11th inning, giving the Diamondbacks a 5-4 victory on Wednesday and sending the Mets to their season-high seventh straight loss.

New York went 0-6 in Milwaukee and Arizona, the Mets' longest winless trip since 1999, according to the Elias Sports Bureau. At 16-23, New York dropped seven games under .500 for the first time September 2014. And Matt Harvey's winless streak stretched to six starts since April 11.

"It's very easy to unravel right now," New York manager Terry Collins said. "I will not let that happen here. We are not going to do that. We are going to stay together, play together. I will not let this team get down."

Montero (0-3) relieved to start the 11th, and Herrmann worked the count full, fouled off a pitch and connected on a belt-high fastball for his first game-ending home run in the major leagues.

"It's awesome, man," Herrmann said. "I haven't hit very many homers in my career. I hit a grand slam, but I don't think there's anything that compares to hitting a walk-off home run. It's something you dream about when you're a little kid, when I'm 6 years old playing out in the cul de sac hitting tennis balls."

As a catcher, Herrmann is no fan of extra innings.

"You get tired behind the plate, and my knees were starting to hurt a little bit," he said.

Herrmman's teammates doused him with a Gatoraid container of ice and water at the plate.

"To be honest, I didn't even feel it," Herrmann said.

Arizona finished its homestand 6-3 and is a major league-best 18-8 at home.

Tom Wilhelmsen (1-1) walked Matt Reynolds and Lucas Duda with two outs in the 11th before throwing a called third strike past Jose Reyes. Wilhelmsen gave up the tiebreaking home run in a 10-inning loss to Pittsburgh on Sunday.

Making his second start since a three-day suspension for failing to show up for a game, Harvey allowed three runs, six hits and four walks in 5 1/3 innings. He left with a 4-3 lead.

"Obviously, if I could go back and change a couple pitches I would," he said. "But overall I felt much better today. Probably the best I've felt in two years. Definitely a positive."

Collins said he "saw some bright things in Matt Harvey today."

Mets starters have gone 17 consecutive games without getting an out in the seventh inning, tying the club high set in 2002.

Jake Lamb's two-run homer in the third was the 11th home run in eight starts this season off Harvey, whose fastball reached 98 mph. After giving up a double to Paul Goldschmidt, Harvey struck out the Arizona slugger twice, on three pitches each time.

Diamondbacks starter Patrick Corbin allowed four runs and nine hits in six innings, and five pitchers combined for two-hit relief. The bullpen, an uncertainty entering the season, has been a strength.

"They've been huge pretty much all year," Corbin said. "Our offence is going to score eventually, so if they keep doing that we're going to win a lot of these games."

First-year manager Torey Lovullo said "the thing that stands out to me is they are one big unit, one cohesive unit that prides themselves on picking up one another."

Michael Conforto and Juan Lagares homered for the Mets. New York led 4-3 before Yasmany Tomas' RBI double in the seventh off Robert Gsellman, whose turn is being skipped in the rotation because of an off day.

"At that point, we felt very good about our chances," Lovullo said.

TRAINER'S ROOM

Mets: LHP Steven Matz was to make his first rehab appearance Thursday night for Class A St. Lucie. Matz has been on the DL all season with left elbow inflammation.

Diamondbacks: RF David Peralta was out of the starting lineup for the third straight game with right glute tightness but pinch hit for Corbin in the sixth and grounded into a forceout.

UP NEXT

Mets: New York opens a home series against the Angels on Friday with RHP Jacob deGrom (2-1, 4.07 ERA) starting. RHP Ricky Nolasco (2-2, 4.34) opens for Los Angeless.

Diamondbacks: RHP Taijuan Walker (3-3, 3.91) start's Friday's trip opener at San Diego, and RHP Jered Weaver (0-4, 6.05) is scheduled for the Padres.