Joe Camporeale-USA TODAY Sports

Merrill Kelly earned his career-high tying 13th victory and Geraldo Perdomo drove in two runs during a five-run fourth inning as the host Arizona Diamondbacks beat the San Francisco Giants 5-2 on Saturday in Phoenix.

Kelly (13-7) allowed two runs on four hits over seven innings for Arizona (71-82), which snapped the Giants' five-game winning streak.

Joe Mantiply pitched a scoreless eighth inning before Reyes Moronta retired the Giants in order in the ninth for his second save.

Mike Yastrzemski doubled and hit a solo homer for San Francisco (74-78), which was held to four hits.

San Francisco broke a scoreless tie with a run in the fourth. Brandon Crawford hit a two-out single, David Villar walked, and Jason Vosler followed with a run-scoring single to right.

Arizona responded by sending nine batters to the plate in the bottom half of the inning against Alex Cobb (6-7).

Christian Walker singled in a run after Arizona's first two batters singled, and Josh Rojas drew a one-out walk to load the bases. Another run scored on Alek Thomas' fielder's choice grounder, and the D-backs extended the lead to 3-1 when Carson Kelly's sacrifice fly scored Walker from third.

Perdomo capped the rally against a visibly frustrated Cobb with a two-run single to right-center field.

The Giants cut into the lead on Yastrzemski's leadoff homer in the sixth against Kelly, who walked one and struck out six.

With the victory, Kelly improved to 3-0 with a 1.53 ERA in five starts versus San Francisco this season.

Pavin Smith had two hits for Arizona, which threatened to add to their lead in the eighth. The D-backs had runners on second and third with one out before Jharel Cotton struck out Rojas and Thomas to end the inning.

San Francisco second baseman Ford Proctor made his major league debut and went 0-for-3 while batting eighth.

Proctor is the 65th Giants player to appear this season, breaking the franchise record set in 2019.

More must-reads:

TODAY'S BEST
Pacers ride historic shooting performance to Game 7 blowout of Knicks
Watch: Aaron Judge blasts 13th home run in Yankees' seventh straight win
Knicks' Jalen Brunson suffers serious injury in Game 7 vs. Pacers
Phil Foden lifts Manchester City to fourth consecutive English Premier League title
Dodgers add recently acquired left-hander to active roster
Report: 2023 No. 7 pick expected to terminate KHL contract, join Flyers
Mavericks advance to Western Conference Finals aided by controversial call late
Connor McDavid, Oilers hammer Canucks to force Game 7
Tyson Fury-Oleksandr Usyk epic increases excitement for potential rematch
Seize the Grey wins in muddy Preakness
Even Mike Budenholzer admits the Suns need a point guard
Watch: Juan Soto's first multi-homer game as a Yankee
Xander Schauffele, Collin Morikawa lead at PGA Championship
Knicks could get major boost for Game 7 showdown with Pacers
Giants All-Star pitcher suffers setback in recovery from injury
Panthers star named winner of 2024 Selke Trophy
WNBA to investigate $100,000 sponsorship deals for Aces players
Tiger Woods blames one big factor for missing the cut at PGA Championship
'Ain't good enough': Draymond Green claims Celtics must 'win it all' or it's a 'failure'
Blue Jays GM wants struggling club to feel 'massive sense of urgency'