Pinch hitter Geraldo Perdomo’s two-run single in the seventh inning put the visiting Arizona Diamondbacks ahead, and they withstood a furious ninth-inning rally by the New York Mets for a 4-3 win on Wednesday night.Still leading 2-1 in the ninth, the Diamondbacks’ Jorge Barrosa and Perdomo lofted back-to-back sacrifice flies to provide pivotal insurance runs.Arizona won for just the second time in seven games.Mark Vientos gave the Mets an early 1-0 lead with a solo homer in the third inning, and Tyrone Taylor went deep leading off the ninth against Justin Martinez.Martinez walked the next two batters, and Ryan Thompson came on. He hit Pete Alonso to load the bases, but then struck out Vientos for the first out and got Jesse Winker to ground out, cutting the deficit to 4-3. After an intentional walk to Jeff McNeil, Thompson got Francisco Alvarez to ground out to end the game.New York had its eight-game home winning streak snapped and lost for only the second time in 15 games at Citi Field this season.The Diamondbacks were blanked on three hits over 6 2/3 innings by Huascar Brazoban, Brandon Waddell and Ryne Stanek (0-3) before they strung together three straight two-out hits in a seven-pitch span off Stanek.Lourdes Gurriel Jr. singled and Barrosa doubled before Perdomo, hitting for Garrett Hampson, blooped a single that landed just in front of a sliding McNeil in left.In the ninth, Gabriel Moreno walked and went to third on Gurriel’s double. They scored on the sacrifice flies by Barrosa and Perdomo.