PHILADELPHIA (AP) Carlos Gonzalez came to the plate in the fourth inning with a runner on first and nobody out and saw the shift-happy Philadelphia Phillies move three infielders to the right of second base.

The lefty slugger promptly laid down a bunt where nobody was on the left side, sparking a big inning as another of manager Gabe Kapler's defensive moves backfired.

Ian Desmond hit a two-run homer in that five-run fourth, Tyler Anderson pitched seven strong innings and the Colorado Rockies routed the Phillies 7-2 on Wednesday night to end a five-game losing streak.

"We were probably most excited about CarGo's bunt," Rockies manager Bud Black said. "After the Nolan (Arenado) walk and then the bunt, that sort of set everything up. It got us going. And CarGo practices that every day."

Trevor Story added three hits and drove in two for the Rockies, who had dropped nine of 11 while falling from first place to fourth in the NL West.

Anderson (4-1) allowed one run and six hits while matching his longest outing of the season, set in his last start.

"I think we were feeding off Andy a little there. He pitched great tonight," Desmond said. "An electric fastball. He was locating all his pitches. He was working quick. You could tell he was pitching with a purpose tonight. And as an offense, I think we fed off that."

Jorge Alfaro and Jesmuel Valentin homered for the Phillies, who were seeking their first three-game winning streak since May 13-17.

Gonzalez's bunt was another blow to the Phillies' defensive alignments, which came under criticism from Philadelphia pitcher Jake Arrieta after a loss at San Francisco earlier this month.

"I don't think it's something we want to see him do every day," Desmond said of Gonzalez. "But that built momentum. It kept it going."

Nick Pivetta (4-6) struck out five straight batters in the second and third innings. But the bunt was the first of five straight hits allowed before he recorded an out in the fifth. Story had an RBI double off the wall and Gerardo Parra followed with a two-run single.

Desmond, who came in hitting .196, then sent an 0-1 slider into the right-field seats for his 12th homer to make it 6-0.

Story, who had his career-high fifth straight multihit game, had another run-scoring double in the seventh against Mark Leiter Jr., giving him 49 RBIs.

Pivetta, who lost his fourth straight start, was charged with six runs on eight hits with three walks over five innings.

Anderson didn't allow a walk and struck out six, including Scott Kingery three times. He used his awkward lefty delivery to keep the Phillies off balance, save for an 0-2 fastball that Alfaro hit to right for his fifth homer in the fifth.

Valentin had three hits, including his first major league homer in the ninth off Harrison Musgrave.

"As soon as I hit it, I thought I had a chance," Valentin said. "Thank God I got it out of the way."

TRAINER'S ROOM

Rockies: Reliever Adam Ottavino (oblique) felt good after throwing Tuesday. "He's champing at the bit to get back on the mound," Black said. "We're really optimistic that this could happen in a couple days." Ottavino has a team-best 0.95 ERA.

Phillies: Reliever Pat Neshek (shoulder, forearm) will throw all of his pitches in a bullpen Thursday. If it goes well, he'll head to Florida to throw live batting practice. Neshek, who signed a two-year, $16.5 million deal in December, has yet to throw a pitch this season. "The greatest acquisition we can make right now is inserting Pat Neshek in our bullpen," Kapler said.

FRANCO BACK, HERRERA SITS

Slumping 3B Maikel Franco started after being out of the Philadelphia lineup five straight games and went 0 for 4.