MIAMI -- A.J. Ellis battled. And battled. And battled.
Ellis hit a tiebreaking single on the 14th pitch of an at-bat against Archie Bradley in the seventh inning, lifting the Miami Marlins over the Arizona Diamondbacks 6-5 on Sunday for their seventh win in eight games.
"I was just glad I didn't have to swing anymore," Ellis said. "My back and my obliques were getting gassed."
Tyler Moore hit a three-run homer and Derek Dietrich had a pair of sacrifice flies for Miami, which finished an 8-2 homestand.
"It ends up being a good homestand for us. We built some momentum," Marlins manager Don Mattingly said. "Hopefully we can go on the road and hold our own out there and see where we're at."
Nick Wittgren (1-0) got two outs around a walk in the seventh, David Phelps pitched a perfect eighth and A.J. Ramos finished to remain perfect in eight save chances. Ramos retired Chris Herrmann on a flyout, then threw called third strikes past Paul Goldschmidt and Jake Lamb.
With the score 5-5, Dietrich doubled off Jorge De La Rosa (2-1), Bradley relieved and Ellis fouled off six consecutive two-strike pitches before taking a ball for a full count and delivering a base hit on a 99.8 mph pitch.
"It's a tough way to end the series with the way we played." Bradley said.
Miami starter Vance Worley allowed five runs, six hits and three walks in 3 2/3 innings.
"The bullpen really picked me up," Worley said. "The hitters got the job done."
Diamondbacks starter Braden Shipley gave up five runs -- four earned -- and seven hits in five innings.
Arizona's Rey Fuentes had his first three-hit game since June 2 last year. Arizona lost three of four in the series.
"I thought we came out after a very tough game yesterday, got some early hits, scored an early run, and kind of set a better tone," Diamondbacks manager Torey Lovullo said. "We had some opportunities and it didn't translate."
Arizona went ahead 5-4 with a three-run fourth that included Daniel Descalso's two-run double and Goldschmidt's RBI double. Dietrich's second sacrifice fly tied it, but JT Riddle struck out looking and stranded the bases loaded.
STANTON STRONG ON HOMESTAND
Miami's Giancarlo Stanton hit .406 (13 for 32) on the homestand with two doubles, four home runs, and eight RBIs.
The Marlins are sending Edinson Volquez's hat, cleats, and a ball from Saturday's no-hitter, the sixth in franchise history, to the Hall of Fame.
Diamondbacks: LHP Robbie Ray (5-3) starts against San Diego on Tuesday in a homestand opener. Ray has not allowed a run in 24 innings.