LOS ANGELES (AP) Tyler Anderson got in a groove from the first inning and kept on going.
Anderson (5-3) struck out eight and walked one on 96 pitches. The left-hander retired his first 11 batters before giving up a two-out single to Justin Turner in the fourth. Matt Kemp singled leading off the fifth and Yasiel Puig narrowly beat out the throw on a two-out bunt in the same inning.
''It's been a while since everything has really been on,'' Anderson said. ''My last couple of starts were pretty close, I felt like my command was there I just made a couple mistakes. Tonight I didn't make those mistakes. It was a total mix of all my pitches.''
Anderson retired five straight batters before allowing a single to Cody Bellinger in the seventh. Anderson improved to 4-0 on the road with a 3.48 ERA while holding hitters to a .216 average. The Rockies have won seven of his last nine starts away from home.
''He kept us off-balance,'' Dodgers manager Dave Roberts said. ''He has a three, four-pitch mix that we couldn't get any swings off of.''
Iannetta homered leading off the ninth, extending Colorado's lead to 3-0.
Arenado hit his team-high 20th homer in the eighth and Valaika homered over the center-field fence for Colorado's first run in the fifth.
Valaika homered for the first time since last Sept. 24 at San Diego. It was just his second homer ever at Dodger Stadium. His first long ball in the majors came on Sept. 24, 2016, in the same stadium.
''It felt good to put the barrel on the ball in a real game, a big league game,'' Valaika said. ''It felt good to get the lead, too.''
The Rockies turned double plays behind Anderson in the fifth and eighth innings.
''Andy pitched great. He was spotting up everything, it was pretty easy to play defense,'' Valaika said. ''I was thinking it was the third inning and I hadn't really fielded anything yet.''
Wade Davis worked the ninth to earn his 23rd save in 27 chances.
Rich Hill (1-3) pitched solidly in his third start since coming off the disabled list because of a finger blister. Only one of his six hits was for extra bases, a double by Trevor Story in the sixth.
''The ball came out of my hand the way I wanted it to,'' Hill said. ''Everything was really came together.''
Hill struck out a season-high 10 and didn't walk anyone while allowing one run in 6 2/3 innings. His 110 pitches were a season high and the most he's thrown since May 13, 2016, at Tampa Bay.
But the Dodgers' bullpen struggled for the second straight game. Scott Alexander gave up Arenado's homer and Yimi Garcia allowed Iannetta's shot.
A day earlier, Walker Buehler was rocked for five runs and five hits in one-plus innings of an 11-5 loss to the Cubs.
Turner's two-out shot in the ninth gave the Dodgers a franchise-record and major league-leading 54 homers in June with one day left.
''This team has set the record for the most home runs in the month for them, so clearly they're trying to put the ball in the air,'' Anderson said. ''Tonight when they did it they were just underneath a lot of things.''
The Rockies began the month getting swept by the Dodgers in a three-game series, with Los Angeles scoring 33 runs in those games. Colorado improved to 5-2 against Los Angeles this season.
PITCHER CAN HIT
Anderson collected a career high-tying two hits with singles in the third and seventh. Hill had an 0-2 count against him in the third and appeared annoyed when Anderson made contact. ''He's a good hitting pitcher,'' Hill said.
Dodgers outfielder Matt Kemp singled in the fifth, snapping an 0-for-15 skid. In his last 23 games against the Rockies since Sept. 20, 2015, Kemp has hit .389.
RHP German Marquez (5-8, 5.53 ERA) starts for Colorado, which has won four of his seven road starts this season. He has a 3.07 ERA away from home compared to 7.93 in Denver. RHP Kenta Maeda (5-4, 3.44) goes for the Dodgers. In eight career games, including six starts, Maeda is 5-2 with a 2.11 ERA to go with 48 strikeouts and nine walks.
More AP baseball: https://apnews.com/tag/MLBbaseball
Copyright 2018 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.