Nick Ahmed hit a go-ahead home run leading off the fifth, Carson Kelly added a two-run shot in the seventh to help Alex Young win his major league debut, and the Arizona Diamondbacks beat the San Francisco Giants 5-1 on Thursday night.

Young (1-0), called up from Triple-A Reno to get his first shot, allowed two hits and one run, struck out five with one walk in five innings.

More Images
Arizona Diamondbacks' Nick Ahmed, right, is congratulated by Carson Kelly after hitting a home run off San Francisco Giants' Tyler Beede during the fifth inning of a baseball game Thursday, June 27, 2019, in San Francisco. (AP PhotoBen Margot)

Arizona Diamondbacks' Nick Ahmed, right, is congratulated by Carson Kelly after hitting a home run off San Francisco Giants' Tyler Beede during the fifth inning of a baseball game Thursday, June 27, 2019, in San Francisco. (AP PhotoBen Margot)

Arizona Diamondbacks pitcher Alex Young works against the San Francisco Giants in the first inning of a baseball game Thursday, June 27, 2019, in San Francisco. (AP PhotoBen Margot)

Arizona Diamondbacks pitcher Alex Young works against the San Francisco Giants in the first inning of a baseball game Thursday, June 27, 2019, in San Francisco. (AP PhotoBen Margot)

San Francisco Giants pitcher Tyler Beede works against the Arizona Diamondbacks during the first inning of a baseball game Thursday, June 27, 2019, in San Francisco. (AP PhotoBen Margot)

San Francisco Giants pitcher Tyler Beede works against the Arizona Diamondbacks during the first inning of a baseball game Thursday, June 27, 2019, in San Francisco. (AP PhotoBen Margot)

Arizona Diamondbacks pitcher Alex Young works against the San Francisco Giants during the first inning of a baseball game Thursday, June 27, 2019, in San Francisco. (AP PhotoBen Margot)

Arizona Diamondbacks pitcher Alex Young works against the San Francisco Giants during the first inning of a baseball game Thursday, June 27, 2019, in San Francisco. (AP PhotoBen Margot)

Arizona Diamondbacks' Nick Ahmed, left, is congratulated by David Peralta (6) after hitting a home run off San Francisco Giants' Tyler Beede during the fifth inning of a baseball game Thursday, June 27, 2019, in San Francisco. (AP PhotoBen Margot)

Arizona Diamondbacks' Nick Ahmed, left, is congratulated by David Peralta (6) after hitting a home run off San Francisco Giants' Tyler Beede during the fifth inning of a baseball game Thursday, June 27, 2019, in San Francisco. (AP PhotoBen Margot)

Christian Walker's RBI groundout put Arizona ahead in the fourth. Brandon Belt tied it leading off the bottom half with his 10th home run.

Arizona Diamondbacks' Nick Ahmed, right, is congratulated by Carson Kelly after hitting a home run off San Francisco Giants' Tyler Beede during the fifth inning of a baseball game Thursday, June 27, 2019, in San Francisco. (AP PhotoBen Margot)

Arizona Diamondbacks' Nick Ahmed, right, is congratulated by Carson Kelly after hitting a home run off San Francisco Giants' Tyler Beede during the fifth inning of a baseball game Thursday, June 27, 2019, in San Francisco. (AP PhotoBen Margot)

The Diamondbacks won for the fourth time in five games following a six-game skid, extending their winning streak at San Francisco to five.

Tyler Beede (1-3) allowed two runs on four hits in 5 1/3 innings. The Giants had gone 5-1 in his starts this year before Thursday but he didn't get support.

Young and Beede, who made his major league debut against the Diamondbacks on April 10, 2018, sometimes work out together during the offseason at Texas Christian University.

Arizona Diamondbacks pitcher Alex Young works against the San Francisco Giants in the first inning of a baseball game Thursday, June 27, 2019, in San Francisco. (AP PhotoBen Margot)

Arizona Diamondbacks pitcher Alex Young works against the San Francisco Giants in the first inning of a baseball game Thursday, June 27, 2019, in San Francisco. (AP PhotoBen Margot)

Arizona's strong showing away from Chase Field continued with its eighth victory in the last 11 road games.

The Giants wasted Brandon Crawford's one-out double in the fifth and did little else against Young and the D-backs bullpen. Aside from Belt's homer and the double by Crawford, the lone other hit was a single from Donovan Solano in the sixth.

SPECIAL DAY

San Francisco Giants pitcher Tyler Beede works against the Arizona Diamondbacks during the first inning of a baseball game Thursday, June 27, 2019, in San Francisco. (AP PhotoBen Margot)

San Francisco Giants pitcher Tyler Beede works against the Arizona Diamondbacks during the first inning of a baseball game Thursday, June 27, 2019, in San Francisco. (AP PhotoBen Margot)

D-backs third baseman Eduardo Escobar wasn't in the starting lineup after traveling to and from Miami to attend a ceremony for his sons Eduardo Jr., 11, and 8-year-old Raul receiving their green cards. Escobar entered in the sixth and delivered an RBI single in the ninth.

MARTE'S NOD

D-backs second baseman Ketel Marte was selected to his first All-Star Game.

Arizona Diamondbacks pitcher Alex Young works against the San Francisco Giants during the first inning of a baseball game Thursday, June 27, 2019, in San Francisco. (AP PhotoBen Margot)

Arizona Diamondbacks pitcher Alex Young works against the San Francisco Giants during the first inning of a baseball game Thursday, June 27, 2019, in San Francisco. (AP PhotoBen Margot)

"We're watching one of the up-and-coming stars for Major League Baseball," manager Torey Lovullo said.

Marte's double in the sixth gave him a 10-game hitting streak and a career-best 20-game stretch reaching base.

He was emotional learning he'd made the NL All-Star squad.

Arizona Diamondbacks' Nick Ahmed, left, is congratulated by David Peralta (6) after hitting a home run off San Francisco Giants' Tyler Beede during the fifth inning of a baseball game Thursday, June 27, 2019, in San Francisco. (AP PhotoBen Margot)

Arizona Diamondbacks' Nick Ahmed, left, is congratulated by David Peralta (6) after hitting a home run off San Francisco Giants' Tyler Beede during the fifth inning of a baseball game Thursday, June 27, 2019, in San Francisco. (AP PhotoBen Margot)

"Yeah, I was almost crying out there. It's a happy moment for me, my family, my career," Marte said. "I want to thank everybody in the organization who helped me to be that player that I am right now. Thanks everybody."

DEBUT DOUBLE

Along with Young, Merill Kelly made his big league debut on April 1 this season, marking the first time since Andrew Chafin and Chase Anderson in 2014 that two Diamondbacks starting pitchers debuted the same year.

TRAINER'S ROOM

Diamondbacks: C Alex Avila (strained left calf) could come off the injured list during this weekend series if he gets through "functional testing" the D-backs need to see. He did some running on the field Thursday and may catch Zack Greinke on Saturday. "He's getting very close," Lovullo said. ... Rookie RHP Jon Duplantier, working back from an inflamed pitching shoulder, will be re-examined Friday and could begin ramping up his throwing program. He has played catch from out to 75 feet. ... To make roster room for Young, Arizona transferred OF Steven Souza to the 60-day injured list as he nurses a left knee injury.

Giants: OF Steven Duggar will begin a rehab assignment from a lower back strain playing with Triple-A Sacramento on Saturday if all continues to go well. Manager Bruce Bochy said Duggar will need to play enough games to "find his groove."

UP NEXT

Kelly (7-7, 3.93 ERA) is 3-1 with a 2.36 ERA over his last five starts and will pitch for a second straight outing opposite San Francisco rookie RHP Shaun Anderson (2-2, 3.94), who like Kelly had a no-decision at Arizona on June 23.

More AP MLB: https://apnews.com/tag/MLB and https://twitter.com/AP_Sports