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.
Ramirez homered, hit a line drive that scored the tiebreaking run and made consecutive catches against the fence to help the Miami Marlins beat the Arizona Diamondbacks 5-1 Sunday.
"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.
Ramirez retreated in the seventh to make nearly identical back-to-back catches on flies by Adam Jones and Jake Lamb to preserve a 3-1 lead.
"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.
Miami's Elieser Hernandez, making his first start since July 4, allowed one run in four innings. Jose Quijada (2-3) faced only six batters in two innings.
"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.