LOS ANGELES (AP) — Christian Yelich and Blake Perkins both homered, had three hits and drove in three runs as the Milwaukee Brewers beat the Los Angeles Dodgers 9-2 Sunday to snap a seven-game losing streak at Dodger Stadium.

Eric Haase had a two-run homer in the fifth inning for the Brewers, who avoided a sweep in the weekend matchup of National League division leaders and are one of three teams in the majors not to have a losing streak of at least four games this season.

Yelich started the scoring with a two-run homer in the fourth inning off Dodgers’ starter Justin Wrobleski (0-1), who was making his major league debut. It was the second straight game Yelich had gone deep to center. He added an RBI double in the ninth inning.

Yelich, voted in as one of the NL’s starting outfielders for the July 16 All-Star Game, batted .393 (11 for 28) with three homers and five RBIs during the Brewers’ six-game road trip.

Perkins had a solo shot in the seventh inning and then drove in two runs when his base hit with the bases loaded just got by Dodgers’ third baseman Kiké Hernández and into left field.

Jakob Junis (1-0) got the win. The right-hander allowed two runs in 2 2/3 innings after he replaced starter Dallas Keuchel, who didn’t allow a run in 4 1/3 innings. Keuchel gave up three hits and walked five.

Chris Taylor supplied the Dodgers’ runs with a two-run shot in the seventh inning. Los Angeles ended up going deep eight times in the series.

Despite the loss, the Dodgers (55-36) are two games in front of the Brewers (53-38) for the second-best record in the NL. Los Angeles heads to Philadelphia — which has the majors best record at 58-32 — for a three-game series beginning Tuesday.

Wrobleski faced the minimum through three innings before running into trouble. The lefty allowed four runs on five hits in five innings with two walks and four strikeouts.

TRAINER’S ROOM

Brewers: RHP Devin Williams (back stress fractures) will throw a live batting practice before Tuesday’s game.

Dodgers: LHP Clayton Kershaw (left shoulder surgery) could make a rehab start on Saturday after throwing two innings in a simulated game. … RHP Joe Kelly (right posterior shoulder) hit two batters in his one inning of work in a simulated game.

UP NEXT

Brewers: Face Pittsburgh on Tuesday to start a six-game homestand. RHP Colin Rea (8-2, 3.34 ERA) is 5-0 in his last eight games, including six starts.

Dodgers: RHP Bobby Miller (1-1, 6.12 ERA) will take the mound against the Phillies on Tuesday.