DENVER (AP) — Garrett Hampson didn't think about being a hero. He only wanted to hit a ball deep enough to score Yonathan Daza from third.
His approach paid off and kept Colorado's faint playoff hopes alive.
Hampson hit a bases-loaded single in the bottom of the 10th inning, and the Rockies rallied to beat the Miami Marlins 7-6 on Sunday, completing a three-game sweep.
Nolan Arenado homered twice for Colorado, which has won four straight and swept a series for the first time since June 18-20. It took a wild finish in which the lead changed three times after the seventh inning.
"It's not an easy thing to do in this game, so it felt good to do it," Arenado said of the sweep. "I don't know if we're in it or out of it, we just have to focus on ourselves and win ballgames."
The Rockies loaded the bases with no outs in the 10th against Jeff Brigham (2-2). Daza had an infield single, Raimel Tapia reached when his grounder got past Isan Díaz — the second baseman's second error of the game — and Ryan McMahon singled.
The Marlins brought right fielder Brian Anderson into the infield, leaving two outfielders. Brigham struck out Ian Desmond before Hampson lifted a 1-0 breaking ball to left to score Daza.
"I was hoping it was going to be deep enough and then I looked out there and there was nobody out there," Hampson said. "Got the job done. It's what you play for. It's what you want to do."
Arenado gave the Rockies a 4-3 lead in eighth inning with his 30th home run of the season, a two-run shot off of reliever Austin Brice. Colorado's Wade Davis, who moved back into the closer's role he lost to Scott Oberg two weeks ago, started the ninth by walking Jorge Alfaro. Lewis Brinson doubled and Neil Walker singled to tie it.
Carlos Estévez came on and allowed a sacrifice fly and Brian Anderson's double, which gave Miami a 6-4 lead. But Díaz couldn't field a grounder cleanly in the bottom of the inning, helping the Rockies tie it against Ryne Stanek.
Charlie Blackmon's RBI single and a sacrifice fly by Trevor Story sent the game to extra innings.
"Obviously I was just trying to get an out," said Díaz, who was playing in his 13th game since being called up from the minors. "I was a little too quick to the ball, a little too fast. The thing is to catch the ball first. I didn't do it."
Miami manager Don Mattingly said the rookie learned a tough lesson.
"We'll make sure we talk with him," he said. "It is something I think that'll help him. You don't want to have that lesson. I've learned that lesson the same way. It's not an easy one to swallow, but you do come out on the other side of it."
Blackmon hit his 26th homer in the sixth to cut the Marlins' lead to 3-2.
Harold Ramírez had three hits and two RBIs to help put the Marlins ahead. Starter Jordan Yamamoto struck out nine in 5 2/3 innings.