PHOENIX -- The big bats in Arizona's lineup provided the power, the leadoff man the table-setting. The starting pitcher got the Diamondbacks through six innings with minimal damage, the defense had a couple of gems behind him, and the bullpen came through again.
As wins go, this one could not have followed the game plan any better.
"A pretty well-played game start to finish," Diamondbacks manager Torey Lovullo said. "That's the way you think about things before the game."
Peralta and Paul Goldschmidt hit solo homers off Jason Vargas (2-5) to help give Arizona a 3-1 lead early. Amed Rosario pulled the Mets within a run on solo homer off Archie Bradley in the eighth inning, but Peralta hit his 14th of the season off Jacob Rhame in the bottom half.
Jake Lamb added a solo shot later in the eighth and Brian Boxberger worked a perfect ninth for his 15th save in NL West-leading Diamondbacks' sixth win in seven games.
The Mets, like the Diamondbacks, had a strong start to the season, followed by a lull. While Arizona is back on track, winning 12 of 16, New York is not. The Mets failed to score more than three runs for the 10th straight game and lost for the 10th time in 11 games.
"You can't sit there and think they are never going to come around," Mets manager Mickey Callaway said. "We go out there every day and try to do our best to prepare them and they do the same thing."
Nimmo at least got the Mets' trip to the desert started off right, hitting a solo homer in the first inning that barely cleared the wall in right. Conforto hit another solo shot off Koch in the sixth, pulling New York to 3-2.
That was about all they could manage against Koch, who allowed two runs before being replaced Yoshihisa Hirano to start the seventh.
"The command was pretty good, the cutter better, the curveball when I needed it, the changeup was off and on a little bit," Koch said. "But for the most part it was good."
Vargas has pitched better since a shaky start to the season, going 2-1 with a 2.50 ERA over his last four starts. He was moved up in the rotation to start against Arizona while Steven Matz deals with a blister on his throwing hand.
Vargas got through five innings against the Diamondbacks, giving up Ketel Marte's RBI single in the second inning, Goldschmidt's solo homer in the third and Peralta's leadoff homer in the fourth
Vargas allowed three runs on five hits with five strikeouts.
"I made some good pitches, got out of some jams I out myself into a little bit, but I felt I threw the ball well," Vargas said.
Hirano has been dominated for the Diamondbacks this season, posting a 1.50 ERA in 32 games. He's been lights out recently, pushing his scoreless streak to 18 games (15 2/3 innings) with a perfect seventh inning.
"They do remind me of one another because they're fearless, attack the zone, can make pitches in both corners of the zone," Lovullo said. "They understand and both have outstanding splits."
The Diamondbacks reinstated RHP Jorge De La Rosa (Achilles bursitis) from the 10-day disabled list and optioned RHP Silvino Bracho to Triple-A Reno. De La Rosa was 0-2 with a 3.54 ERA in 27 games before going on the DL.
Bracho was 2-0 with a 1.42 ERA in 11 games with Arizona.
Mets: 1B Wilmer Flores went 2 for 3 with an RBI for Single-A St. Lucie Wednesday night, his second rehab game since going on the 10-day DL with a sore lower back on May 28. ... OF Jay Bruce was held out of the lineup after aggravating a hip injury Wednesday against Atlanta.
Diamondbacks: OF Steven Souza will continue throwing take live batting practice on Friday as he works his way back from a strained right pectoral muscle.
More AP baseball: https://apnews.com/tag/MLBbaseball
With the game tied in the eighth, Juan Soto hits a double to left center to score Bryce Harper and Trea Turner.
The New York Yankees have the best record in baseball at 50-22, and they've rarely been better than against the Tampa Bay Rays this season.
The Colorado Rockies begin a weekend series Friday with the Miami Marlins, hoping to finish a homestand by taking advantage of another National League East laggard.
Angels center fielder Mike Trout played in his 1,000th career game Thursday, but he served as the designated hitter again while nursing what he called "a pretty painful" sprained right index finger.
Giants closer Hunter Strickland, who is expected to be out six to eight weeks after breaking the pinkie on his pitching hand when he punched a door after blowing a save, apologized Thursday and said he'd consider anger management counseling.
The Cleveland Indians have spent much of the first half of the season looking for a dependable No. 5 starter for their rotation to slot in behind Corey Kluber, Trevor Bauer, Carlos Carrasco and Mike Clevinger.