PHOENIX -- Jake Lamb has spent a big chunk of this season injured and even when healthy, his .199 batting average entering Monday was proof of a year gone awry.
But in a big moment for the Diamondbacks, he came through. Lamb hit a three-run double in the seventh inning as Arizona rallied for a 7-5 victory over the Miami Marlins.
"It's no secret how I've been playing," Lamb said. "But I feel like I've done a pretty good job of coming to the yard every day, trying to get better and I just work, work, work.
"It's nice to come through in that situation. I've always loved hitting in those situations."
Clinging to slim postseason hopes, remained 5 1/2 games back of the Chicago Cubs for the second NL wild card with 11 to play and also would have to leapfrog Milwaukee, Philadelphia and the New York Mets.
At 52-98, the NL-worst Marlins matched their loss total of last year and appear headed to their first 100-defeat season since 2013.
"We've had some tough losses so I just wanted to get the team out on the right foot in this series and set the tone," Ray said.
"One of the toughest things in all of baseball is pinch-hitting and in that situation you are just looking to get a pitch in the zone to do something with," Walker said.
Lopez then gave up a single and a walk before being replaced by left-hander Andrew Chafin, who faced left-handed-hitting Magneuris Sierra. The speedy Sierra dropped a perfect bunt down the third-base line and Chafin -- who wasn't going to get Sierra out anyway -- made an errant throw to first that scored Lewis Brinson with the tying run.
Then it was the Marlins turn to have a pitching breakdown.
Arizona sent eight batters to the plate in the seventh, punctuated by Lamb's two-out double down the right-field line.
"Nobody's working harder than Jake Lamb to make good moments happen," manager Torey Lovullo said. "We know what type of year he's having. It's been very frustrating. But to have him come through in that critical moment was a really good sign."
Hirano (5-5) pitched a scoreless inning, and Kevin Ginkel got three straight outs for his first big league save. Tayron Guerrero (1-2) gave up three runs, two hits and a walk without getting any outs.
Arizona set a team record when Wilmer Flores, Josh Rojas and Jake Lamb were hit by pitches in the same inning by Pablo Lopez. Flores was hit on the shoulder while Rojas and Lamb were both hit on a foot by breaking balls. Lamb was hit with the bases loaded, scoring Flores for a 1-0 lead.
Marlins: Miami claimed LHP Josh Smith off waivers from Cleveland and threw a scoreless eighth inning. The 29-year-old pitched eight games in relief this season for the Indians, striking out 12 over 8 1/3 innings.
Diamondbacks: Ray pitched well after battling a blister on the middle finger of his throwing hand over the last two starts. He lasted just two-thirds of an inning against the Mets on Sept. 11, giving up five runs. ... SS Nick Ahmed left the game in the eighth inning after a finger injury on his throwing hand. Lovullo said Ahmed's finger got hit by a bad hop and it peeled back his fingernail. ... RHP Archie Bradley was unavailable to pitch on Monday because of back spasms.
Marlins: Miami sends LHP Caleb Smith to the mound. He's got an 8-10 record with a 4.13 ERA.
Diamondbacks: Arizona LHP Alex Young will make his 14th start. He is 7-4 with a 3.38 ERA and set a club rookie record by striking out 12 against the Reds on Sept. 7.
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports
Christian Yelich's run game and other lessons from Bill James Handbook
The Brewers star's overlooked talent and the value of the shift are part of the next-level fun in the annual analytics manual.
What Jeff Passan is hearing about MLB free agency, trade rumors and latest offseason buzz
With the MLB offseason underway, here's which potential free-agency moves and winter trades have baseball teams, players and agents talking.
Braves, Darren O'Day agree on one-year, $2.25M contract
Darren O'Day has agreed to a one-year, $2.25 million contract to remain with the Braves.
Top offseason spenders might include Angels, Padres, White Sox
Keith Law and Jeff Passan predict the teams that will be the biggest buyers this offseason.
Will Francisco Lindor and Kris Bryant be traded?
Keith Law and Jeff Passan predict whether the Indians and Cubs will make moves this offseason involving stars Francisco Lindor and Kris Bryant.
Will Dodgers spend for top-notch free agent this offseason?
Jeff Passan and Keith Law discuss the possible moves the Dodgers might make after another disappointing postseason.