Rickie Weeks hit a three-run homer and Gerardo Parra had two hits and two RBIs to lead the Milwaukee Brewers to a 9-3 victory over the Los Angeles Dodgers on Friday night.

The Dodgers went ahead 3-2 in the top of the seventh, then Milwaukee capitalized on two errors by reserve shortstop Justin Turner and scored four runs in their half of the inning.

Weeks hit a 2-2 pitch from Carlos Frias for his homer in the eighth inning that made it 9-3.

“It’s so nice to go into the ninth inning and you’ve got a big lead. ... We do not have that happen very often, so it’s nice to see,” Brewers manager Ron Roenicke said. “Not only do we come back and tie it and then get the lead, then all of a sudden we get the big homer from Rickie and that opens it up.”

The first run in the seventh came on Martin Maldonado’s squeeze bunt that scored Weeks. He bunted the ball toward Brandon League (2-3), who tried to flip it with his glove to catcher Drew Butera but was late. Pinch hitter Khris Davis reached on Turner’s fielding error to load the bases. Carlos Gomez then reached on Turner’s throwing error that allowed Mark Reynolds to score. Parra followed with a two-run single that gave Milwaukee a 6-3 lead.

Dodgers starting shortstop Hanley Ramirez left the game in the first inning with tightness in his right side and was replaced by Miguel Rojas.