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 .
Is a shortened MLB draft the best idea?
Kiley McDaniel breaks down the possible repercussion of MLB having a shortened draft due to COVID-19.
Noah Syndergaard case an example of complex financial decisions to come
The timing of the talented righty's surgery combined with the looming economic hit that teams will face illustrates the muddied waters ahead.
On this date: Cy Young is born, Rusty Staub dies
In honor of March 29, Tim Kurkjian tells stories of Cy Young on the anniversary of his birth and Rusty Staub on the anniversary of his death.
Tim Kurkjian's baseball fix - Of Cy Young, Big Klu and Le Grande Orange
How good was Cy Young? Well, the award is named after him. But maybe you didn't know that Ted Kluszewski cut off the sleeves of his uniform or Rusty Staub was such a good cook he took pots and pans on road trips.
How Tim Anderson, White Sox are staying prepared
Tim Anderson explains how he and his White Sox teammates continue to stay connected and prepared for whenever baseball returns.
Joey Gallo shows off his work from home setup
Joey Gallo isn't letting quarantine stop him from getting hits in.