SEATTLE (AP) -- Paul Goldschmidt hit his 22nd homer of the season in the first inning and scored the go-ahead run in the 10th on Jake Lamb's sacrifice fly as the Arizona Diamondbacks beat the Seattle Mariners 4-3 on Monday night.
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 in the 10th, then hit Welington Castillo on the arm to load the bases with one out. Smith was pulled in favor of Vidal Nuno to face Lamb. The Seattle native drove Nuno's pitch deep enough to center for Goldschmidt to score from third.
Andrew Chafin pitched the 10th for his second save, striking out Seth Smith for the final out with the tying run at second base.
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.
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.
Goldschmidt continued his stellar season with the solo shot to left field 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.
The Diamondbacks also got an unearned run in the second on shortstop Brad Miller's error.
Robinson Cano hit his 11th homer and ninth in the past 30 games, a solo shot in the sixth off Robbie Ray that cut Arizona's lead to 3-2. Morrison added an RBI single for Seattle.
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.
Montgomery struggled early but managed to get through 6 2-3 innings throwing a season-high 116 pitches. Montgomery allowed five hits and struck out five, but walked four.
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.
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.