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
How the biggest stars in sports are practicing while social distancing
Omar Raja highlights how some of the biggest athletes in sports are keeping up with their training while quarantined.
MLB's brightest stars under 25
Check out the highlights from baseball's biggest stars under the age of 25.
Ex-Astros catcher Evan Gattis: We obviously cheated baseball, fans
Evan Gattis, who was a catcher and DH as the Astros won the World Series in 2017 amid a sign-stealing scandal, said he understands why it's "not ... good enough to say sorry."
Betting roundtable: Our experts reflect on their most regrettable bets
With the sports betting world essentially on hold, our experts look back on some of the worst overall bets they made over the past year.
Pirates pitcher Brault shows off singing voice
Pirates pitcher Steven Brault displays his singing voice by performing the national anthem before a 2018 game vs. the Brewers
Pittsburgh Pirates lefty Steven Brault makes his musical pitch
Steven Brault can make a baseball dance, but he can also make his voice sing. That's why he is not only a full-time pitcher but a part-time singer -- for now. One day, his voice, not his arm, will be his career.