SEATTLE -- Nervous at the start, Jake Lamb coolly helped deliver a winning finish to his first major league game back in his hometown.

Lamb's sacrifice fly in the 10th inning scored Paul Goldschmidt with the go-ahead run, and the Arizona Diamondbacks pulled out a 4-3 victory over the Seattle Mariners on Monday night.

Lamb, a Seattle native who played collegiately at Washington, left 50 tickets for family and estimated he had 90 total supporters in the stands at Safeco Field to see his first professional game at home. He didn't disappoint, lofting a fly ball off reliever Vidal Nuno deep enough for Goldschmidt to score from third.

More from FoxSports

"I was pretty nervous that first inning, but after that first (at-bat) I took some good pitches, got the walk and that kind of locked me in," Lamb said. "It slowed down and I was able to really enjoy the moment and that was awesome."

The Diamondbacks won their third straight despite blowing a 3-2 lead in the ninth inning. They took advantage of control issues by Seattle closer Carson Smith (1-4) in the 10th to regain the lead.

Smith walked two of the first three batters he faced then hit Welington Castillo on the arm to load the bases with one out. Smith was pulled in favor of Nuno, but Lamb stayed with the cutter on the outer half of the plate and was able to drive it deep enough.

"That was cool that it worked out like that," Lamb said.

Goldschmidt continued his stellar season with his 22nd home run in the first inning off Seattle starter Mike Montgomery. Castillo, who was with Seattle for all of two weeks earlier in the season before being traded to the Diamondbacks, added his eighth homer with a drive deep to left-center.

Goldschmidt's homer was just his third since June 18.

Arizona was one out from winning in the ninth, but Mike Zunino lined an RBI single on a 0-2 pitch off reliever Oliver Perez (2-1) to score pinch-runner Chris Taylor with the tying run.

"Mike is swinging the bat good," Seattle manager Lloyd McClendon said. "He's starting to swing the bat the way we think he's capable of swinging and we need that production at the bottom half of the order."

Arizona tried to get through the ninth with Daniel Hudson and Perez after closer Brad Ziegler -- having converted 15 straight save attempts -- was given the night off after pitching the previous three days.

Hudson gave up a two-out double to Mark Trumbo and Perez walked Logan Morrison on a 3-2 pitch to set the stage for Zunino.

"When you give up a lead, to have them tie it in the bottom of the ninth, it's tough," Arizona manager Chip Hale said. "For our guys to come right back against their closer and create a run was huge. It shows how resilient they are."

Andrew Chafin pitched the 10th for his second save, striking out Seth Smith for the final out with the tying run at second base.

RAY'S DAY

Robbie Ray pitched seven innings for the third time all season, striking out eight and walking two. He got defensive help in the second inning when Ender Inciarte pulled back a potential two-run homer from Zunino at the top of the wall in left-center.

Ray's only mistake was Robinson Cano's 11th homer, a solo shot in the sixth.

MINOR DEAL

The Mariners acquired right-handed pitcher J.C. Ramirez in a minor league trade with the Diamondbacks in exchange for cash on Monday. Ramirez was originally signed by Seattle and traded to Philadelphia in 2009. He was 0-1 with a 2.88 ERA in 23 games with Triple-A Reno and 1-1 with a 4.11 ERA in 12 games with Arizona this season. He will report to Triple-A Tacoma.

UP NEXT

Diamondbacks: Zack Godley (1-0) makes his second career start. Godley became the first pitcher since 1900 to throw at least six scoreless innings with no walks and strike out seven or more in his major league debut.

Mariners: Hisashi Iwakuma (2-1) will make his fifth start since coming off the disabled list. Iwakuma gave up two first-inning runs in his last start against Detroit, then shut out the Tigers for the next six innings.