Alcantara was good in his first outing there. Gray was better.
Gray scattered five hits and didn't walk a batter in his best outing of the season. He threw 100 pitches and was an inning short of the second complete game of his career. He pitched eight innings for the second time in four starts.
"He was outstanding tonight," manager Bud Black said. "If we added on a little more Jon was still alive to go back out. I didn't think tonight was the night to push him to 115."
Gray beat Alcantara in a rematch of a pitching duel in Miami on March 31. Alcantara pitched eight shutout innings in a 3-0 win, but was nicked by a long ball on Friday, one of just three hits he allowed over seven solid innings.
This time it was Gray. He went eight shutout innings and would have gone out for the ninth if the Rockies had a bigger lead. Still, he helped his team win two in a row for just the second time since June 29.
"I knew if we put up a couple of more runs in the eighth I'd get the opportunity," Gray said. "Came really close."
McMahon hit a two-run homer in the second inning, his 15th of the season, in support of Gray, who retired 15 batters in a row after Miami led off the second with consecutive singles.
Gray struck out Lewis Brinson with runners on first and second, and then got an inning-ending double play by Bryan Holaday. Gray set down 12 batters on groundouts, starting with Holaday's double play.
He faced another jam in the seventh when Neil Walker tripled off the wall in right-center with one out. Gray got Starlin Castro to fly out to shallow center and Harold Ramirez lined out to first to keep Miami off the board.
"We attacked from the get go," Gray said. "We didn't walk people, we stayed in the zone with all of our pitches. We just attacked and good things happened."
Alcantara (4-11) went seven innings and allowed just three hits. He walked four, including one ahead of McMahon's homer, and struck out just two. He retired the last seven batters he faced.
"I kept the ball down and got out of trouble with double plays," Alcantara said. "I just missed one pitch in the second inning and it was 2-0."
Arenado homered in the eighth, his 28th. Scott Oberg got the final three outs for his fifth save.
The game was delayed 20 minutes in the third inning due to lightning.
Marlins: RHP Jose Urena (lower back soreness) was scheduled to make a rehab start for Class A Jupiter on Friday night, while RHP Pablo Lopez (right shoulder strain) was slated to throw an inning for Triple-A New Orleans. Both have been out since mid-June.
The Marlins activated Walker from the 10-day injured list before the game and designated infielder Deven Marrero for assignment. Walker missed 12 games with a right index finger sprain.
"It's good to get Walk back, gives us a lefty, a switch-hitter and a guy who can play both corners," manager Don Mattingly said. "It just helps our lineup, lets us stretch it different ways."
Alcantara kept the Rockies off balance for most of the game, but consecutive sliders to McMahon in the second inning proved costly.
"First pitch (was) a backdoor slider that didn't really break back," McMahon said. "The next pitch was a slider over the plate, and he showed me the timing on the pitch before that. I was geared up for a heater but saw it really well. It stayed there and didn't bite like a slider usually does."
Miami will send RHP Hector Noesi (0-2, 8.18) against Colorado RHP German Marquez (11-5, 4.57) in the second game of the weekend series on Saturday night. Noesi has never faced the Rockies, while Marquez is 1/3 in four career starts against the Marlins.
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports
Atlanta Braves to reduce Tomahawk Chop in Game 5
The Braves have started an effort to "reduce the Tomahawk Chop" during Game 5 of the NLDS out of respect for Cardinals pitcher Ryan Helsley, a member of the Cherokee Nation.
Alipour: Manfred is trolling us by bringing up Las Vegas
Sam Alipour responds to reports that MLB commissioner Rob Manfred mentioned Las Vegas as a possible new home for the Oakland A's.
Source: Twins nearing deal to keep Derek Falvey in front office
Derek Falvey joined the Twins in October 2016 from Cleveland, where he was the assistant general manager.
Sources: Twins expected to pick up $12M option for Nelson Cruz
Nelson Cruz, who became just the third player in team history to hit 40 home runs, is expected to remain with the Twins for 2020 when they exercise their $12 million option, sources told ESPN.
Atlanta Braves' Adam Duvall to start Game 5 in left after offensive heroics
Atlanta Braves outfielder Adam Duvall will start Wednesday in Game 5 of the NLDS against the St. Louis Cardinals after coming off the bench in the first four games of the series.
'They challenge each other': Walker Buehler and Clayton Kershaw look to pitch Dodgers into NLCS
The pair of L.A. aces are very different pitchers -- and people -- but they've bonded as teammates. Wednesday, they're expected to combine forces against the Nats in a winner-take-all Game 5.