Arizona Diamondbacks catcher Carson Kelly tags out San Francisco Giants' Abiatal Avelino in the sixth inning of a baseball game, Monday, Aug. 26, 2019, in San Francisco. (AP Photo/Ben Margot)

SAN FRANCISCO — Not long after his leaping catch at the wall, Jarrod Dyson used a little pre-planning to put himself in perfect position to make a second spectacular play.

On a night when the Diamondbacks' leadoff hitter went 0 for 5, Dyson's defense more than made up for it.

The speedy outfielder turned in a pair of stellar plays in the sixth inning after Eduardo Escobar scored the go-ahead run on a wild pitch, and Arizona held on to beat the San Francisco Giants 6-4 Monday.

"Those are some unnoticed things, those little gems," Diamondbacks manager Torey Lovullo said. "That gave us a huge boost. I could see what it did to the morale inside of the dugout. I'm sure the players felt that on the field as well."

Escobar hit a two-run single in the seventh and Adam Jones delivered his third pinch-hit homer this season in the eighth. Wilmer Flores added three hits and an RBI to help the Diamondbacks to their sixth win in eight games against the Giants. Ketel Marte singled to extend his on-base streak to a career-high 20 games.

Alex Young (6-3) allowed two runs, one earned, in 5 1/3 innings and beat the Giants for the second time this year.

Dyson's defense stood out on a night when two teams chasing an NL wild card combined for four errors.

The right fielder started the sixth with a leaping catch at the wall to take a hit away from Evan Longoria. After three consecutive hits made it 3-2, Dyson fielded Brandon Crawford's single and threw a one-hop strike to catcher Carson Kelly, who tagged out Abiatal Avelino at the plate.

"Crawford's the type of guy, he likes to pull the ball," Dyson said. "I played the play in my head before it happened, and it happened exactly how I played it. I knew the runner at second was pretty fast so I'm like, 'Hey, don't get too far deep.'"

Avelino ran through a stop sign from third base coach Ron Wotus.

"He didn't break right away and that's usually when you know you're not going to score, especially on a ball hit like that," Giants manager Bruce Bochy said. "But he just kept running and knocked us out of a potential big inning there. That baserunning mistake hurt us."

San Francisco loaded the bases with two outs later in the inning before Matt Andriese struck out Donovan Solano.

The Giants scored a pair of unearned runs off Yoan Lopez with two outs in the ninth before Archie Bradley struck out pinch-hitter Mike Yastrzemski for his eighth save.

Escobar gave the Diamondbacks the lead in the sixth after reaching on a two-out error by third baseman Longoria, who was playing behind second in a defensive shift. After going to third on Christian Walker's single, Escobar scored when Tyler Beede (3-8) bounced a curveball past catcher Buster Posey. Flores followed with an RBI single.

Crawford had three hits and Longoria singled twice for San Francisco.

YOUNG ARMS

Young allowed four hits, walked two and struck out four. The lefty retired nine of 10 during one stretch and struck out Posey with runners at first and third to end the fifth. Young's start was the 57th this season by an Arizona rookie pitcher, breaking the previous franchise record.

TRAINER'S ROOM

Giants: Johnny Cueto allowed two home runs in 4 1/3 innings of a rehab start with Triple-A Sacramento. Cueto gave up six hits and four runs (three earned) with three strikeouts. He will make at least one more rehab start, according to Bochy ... Yastrzemski will continue to get treatment on his bruised left hand but avoided a trip to the injured list. He underwent X-rays that were negative after the rookie outfielder was pulled from Sunday's win over Oakland.

UP NEXT

Giants right-hander Jeff Samardzija (9-10, 3.44 ERA) is holding opponents to a .173 batting average over his last 10 starts. Mike Leake (9-10, 4.77 ERA) is 0-2 with an 8.02 ERA in four starts with the Diamondbacks since arriving from Seattle in a trade. He is 5-2 in 13 career games against San Francisco.