MIAMI -- Harold Ramirez committed an ugly error and disagreed with a ruling that cost him an RBI double. Even so, the rookie outfielder had one of his best games yet.
"I really feel so good about my day today," Ramirez said. "I enjoyed everything I do. I made an error, but that happens sometimes."
Arizona's lone run scored in the second inning when Ramirez fielded a single and made a wild throw from left field, allowing Nick Ahmed to score from first.
Miami went ahead to stay in the fifth when Ramirez's two-out liner deflected off the glove of left fielder David Peralta, allowing Miguel Rojas to score from first. The official scorer charged Peralta with an error.
"I think that one is a base hit for me, a double," Ramirez said.
"The ball was hit hard, I know that," Marlins manager Don Mattingly said.
Diamondbacks left-hander Robbie Ray (9-7) allowed two earned runs in six innings. He said he hasn't been affected by speculation he might be traded.
"I'm going out there to pitch every fifth day, so whatever happens happens," Ray said. "I feel like I've put myself in a good situation. I've been pitching really well lately, so we'll just have to see."
Ray's streak of wins in four consecutive starts ended even though he struck out 11 and walked none.
Rojas led off the first inning with a home run for the second game in a row. Miami teammate Brian Anderson added his 14th homer in the sixth, and Ramirez hit a two-run shot in the seventh, his sixth.
"That was unbelievable, and a great turning point in the game," Rojas said.
Arizona totaled four hits against five pitchers.
"I don't want to disrespect any major league pitching staff," Diamondbacks manager Tony Lovullo said, "but I know that we've got a better offensive team than we showed today."
Arizona went 0 for 7 with runners in scoring position.
"We got some big outs out of the `pen," Mattingly said.
Ramirez had two hits to hike his batting average to .276 in 63 games. The error was his first, but his defense has been inconsistent.
"Harold is a guy who is still making adjustments up here," Mattingly said. "He made some nice plays today; I also saw him just about throw one in our dugout. He's a work in progress. It will work its way out what kind of player he's going to be."
Diamondbacks RHP Greg Holland lost his job as closer after blowing a save for the fifth time in 22 chances this season in Friday's loss. Lovullo said he'll go with a closer by committee temporarily to give Holland a breather for a while. "For right now it will be a matchup game," Lovullo said.
After the game, Diamondbacks RHP Taylor Clarke was activated off the paternity list and RHP Stefan Crichton was optioned to Triple-A Reno.
Diamondbacks INF Christian Walker was available off the bench after being hit by a pitch on his left arm Saturday.
Marlins: LHP Caleb Smith (6-4, 3.30 ERA) is scheduled to start the series finale Monday night. He's holding opponents to a .193 batting average, fourth-best in the majors.
Diamondbacks: RHP Merrill Kelly (7-10, 4.22) has an ERA of 2.35 in his past five road starts.
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports
Follow Steven Wine on Twitter: http://twitter.com/Steve-Wine .
White Sox look to tee off on Hernandez, Mariners
With two weeks left in the season, the Chicago White Sox are in position to take two legs of the American League's Triple Crown.
Giants look to up offense, support Bumgarner vs. Marlins
San Francisco left-hander Madison Bumgarner goes after his 10th win of the season while Miami right-hander Robert Dugger chases the first of his career as the starting pitchers are scheduled to duel on the second night of a three-game series between...
Rays' Kiermaier might be back in lineup vs. Angels
The Tampa Bay Rays hope center fielder Kevin Kiermaier can return to the starting lineup Saturday against the Los Angeles Angels after recovering from neck soreness.
D-backs running out of time, hope in wild-card chase
The Arizona Diamondbacks continued their three-week stretch of extremes Friday, and their playoff chances took another hit.
Padres' Lauer looking for better effort vs. Rockies at Coors Field
3-0 in his last seven starts while yielding more than three runs in only one of them.
After dreadful outing, Fiers looks to keep A's rolling
Right-hander Mike Fiers will attempt to bounce back from the shortest start of his major league career while also trying to pick up his 15th victory of the season when the Oakland A's take on the Texas Rangers on Saturday night in Arlington, Texas.