MIAMI - Giancarlo Stanton took a mighty swing and topped the ball, which dribbled 40 feet before it came to rest on the third-base foul line for a two-out, run-scoring infield single.

Stanton had a blast to go with his bloop, hitting his 22nd homer and driving in four runs to help the Miami Marlins break a three-game losing streak Thursday night by beating Colorado 6-0.

Stanton, who leads the majors in homers and RBIs, said the swinging bunt felt just as good as the homer.

"You've got to rack those up and get your average up," said Stanton, who is batting .249. "Whatever works."

David Phelps (3-3), rocked by the Rockies at Coors Field last week, pitched a career-high eight innings, allowing four hits. Chris Rusin (2-1) gave up 11 hits and six runs in 5 1-3 innings.

Stanton pulled a liner into the Rockies bullpen for a three-run homer in the first inning. He said he knew the ball was gone when he hit it, even though the trajectory was never higher than about 20 feet.

"That's all you need," Stanton said.

It was only his second homer this year with more than one runner on base. He batted cleanup for the second straight game after previously hitting third this season.

Stanton said the change makes no difference to him, but manager Dan Jennings indicated he may stick with the new lineup for a while.

"The whole idea was to get more traffic on in front of 'G' and give him run-producing situations," Jennings said.

Stanton enjoys success against the Rockies wherever he bats. In 35 career games against Colorado he has 13 homers and 41 RBIs, including his run-scoring dribbler to make the score 5-0 in the second inning.

"It counts like a line drive," Jennings said. "We'll take it. That tells you what happens when you put the ball in play."

Jeff Baker hit his third homer, Christian Yelich drove in a run with his first triple, and Marcell Ozuna singled to extend his hitting streak to 12 games.

Miami shortstop Adeiny Hechavarria, batting leadoff for the first time this year, had three hits, stole a base and scored a run. He also charged a grounder and made an acrobatic throw while airborne and horizontal to rob Nick Hundley of a hit.

The Marlins' big offensive show came without major league batting leader Dee Gordon, who was given the night off. Gordon leads the majors with a .356 average but is batting .255 since May 15.

Phelps struck out six, walked one and threw 111 pitches to improve his chances of staying in the rotation. He gave up nine runs in a loss at Colorado last week.

"I'd like to think I learned what not to do last time out," Phelps said. "I didn't make a whole lot of quality pitches last time. That's what I was really focusing on tonight, and it paid off."

By contrast, Rusin regressed after beating Phelps last week.

"I just didn't hit my spots," Rusin said. "The ball was up this time. The last time I kept the ball down and had movement. Today I didn't."

Miami's Carter Capps struck out two in the ninth to complete a five-hitter.

The Rockies' Corey Dickerson, activated before the game from the disabled list, had two hits in four at-bats. Troy Tulowitzki had a single to extend his hitting streak to 10 games.

TRAINER'S ROOM

Barring a setback, Marlins RHP Jarred Cosart (vertigo) will rejoin the rotation early next week. He made a rehab start Thursday for Triple-A New Orleans and gave up two runs in 5 2-3 innings.

ROSTER MOVE

After the game, the Marlins optioned LHP Adam Conley to Triple-A New Orleans. A corresponding move will be made Friday.

UP NEXT

Rockies RHP Kyle Kendrick (2-7), who has the second-worst ERA among major league starters at 6.16, is scheduled to start Friday against Marlins rookie RHP Jose Urena (0-2, 5.49).