PHOENIX -- A bullpen blowup put the Arizona Diamondbacks in a tough spot Tuesday night.
A next-day bounce back keeps their slim NL wild-card hopes alive.
"After a really tough night last night where you're kind of ground down, the guys came out today, quick turnaround, and executed the game plan and won a baseball game," Arizona manager Torey Lovullo said, referencing Tuesday's 12-6 loss to Miami.
Arizona is 4 1/2 games behind the Cubs and Brewers in the race for the NL's second wild-card spot.
The Diamondbacks responded by jumping on Sandy Alcantara (5-14) early to keep their slim playoff chances alive with nine games to go.
"Pretty good game in general. Back and forth," Marlins manager Don Mattingly said. "We didn't get enough big hits to get over the hump today."
The Marlins (53-99) are one defeat from the third 100-loss season in team history, the first since 2012.
Leake allowed four earned runs in 26 innings over previous four starts, but the Marlins hit him hard early.
Marlin hit his 20th homer in the second inning and Harold Ramirez followed with a run-scoring single. Dean hit a solo homer in the fourth.
Leake gave up three runs on eight hits and struck out four.
"The home runs are kind of chance pitches that are not quite getting where they're supposed to," Leake said.
Alcantara allowed one run over seven innings his last start, against San Francisco. He wasn't nearly as effective against the Diamondbacks, who scored four runs off the right-hander in the first three innings.
Alcantara left a 1-2 pitch up and over the plate in the first inning to Almonte, who sent it into the pool deck in right-center.
Leyba hit run-scoring triple and scored on Jerrod Dyson's single in the second inning, then drove in another run in the fourth on a groundout. Walker's 26th homer put Arizona up 5-3 in the sixth.
Alcantara allowed five runs -- four earned -- on seven hits in 5 2/3 innings.
"I want to go as deep as I can. Sometimes that doesn't happen," Alacantara said. "Don't want to have a bad day, but today was not a bad day. I want to finish strong. I have two starts left. Working hard to get better every time."
Arizona catcher Alex Avila was called for catcher's interference on a swing by Ramirez in the eighth inning, prompting a visit to the umpire by Lovullo.
The reason? Avila thought the ball was already in his glove when Ramirez made contact. Under baseball rules, catcher's interference can't be called if the catcher already has the ball in his glove.
Lovullo talked over the bang-bang play with plate umpire Brian Knight and the umpires gathered, but ultimately decided Ramirez struck Avila's glove just before he caught it.
"I just wanted them to get together because Al felt strongly it was in his glove," Lovullo said. "The umpires thought it was approaching. I haven't seen the play, but was told the umpires got it right."
Marlins: C Jorge Alfaro was back in the lineup after being hit on his non-throwing hand by a bat and leaving Tuesday's game in the second inning.
Diamondbacks: CF Ketel Marte was out of the lineup and had a precautionary MRI after leaving Tuesday's game in the fifth inning with back stiffness. He is expected to get a CT scan next and his status for the upcoming series at San Diego is still up in the air. ... SS Nick Ahmed was out for the second straight due to an injured finger on his throwing hand suffered in Monday's game.
Marlins: RHP Robert Duggar has allowed two runs or less in five straight starts heading into Friday's game at home against Washington.
Diamondbacks: RHP Merrill Kelly is 2-1 with a 1.35 ERA in three starts heading into Friday's game at San Diego.
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports
Former Colorado Rockies All-Star Todd Helton sentenced to two days in jail following DUI arrest
Todd Helton, a retired All-Star first baseman who played for the Colorado Rockies, was sentenced to two days in jail after a DUI arrest in Tennessee.
How baseball players are using Twitch to connect with fans
Joon Lee details how MLB players are using Twitch, Xbox Live and PlayStation Network as ways to connect with fans while the MLB season is on hold.
Kurkjian: Late HOFer Al Kaline could do everything on the diamond
Kaline was the youngest player to win a batting title, and opponents marveled at the breadth of skills of the Tigers great.
Hall of Fame outfielder and Detroit Tigers legend Al Kaline dies at 85
Hall of Fame outfielder Al Kaline, an 18-time All-Star and a 10-time Gold Glove winner with the Detroit Tigers, has died at 85.
Chicago teams coordinate stay-at-home message
Chicago's sports teams are cooperating with the city to relay the message that fans need to stay at home.
Could South Korean Baseball provide template for MLB's return?
Jeff Passan describes how the MLB could replicate what the Korea Baseball Organization is doing to manage the coronavirus to start its season.