PHILADELPHIA — Pinch-hitter Andre Ethier and Curtis Granderson homered Thursday as the Los Angeles Dodgers clinched a tie for the NL West title, ending a four-game losing streak by beating the Philadelphia Phillies, 5-4.

The Dodgers can win their fifth straight division title Friday night with a victory at home against San Francisco or a loss by second-place Arizona to Miami.

Los Angeles avoided a four-game sweep by the last-place Phillies, winning for just the sixth time in 26 games.

Dodgers third baseman Justin Turner sustained a bruised right thumb when he was hit by a pitch from Mark Leiter Jr. in the first inning and left the game.

Turner is hitting a team-leading .321 with 21 homers and 70 RBI.

BRAVES 3, NATIONALS 2: R.A. Dickey frustrated Washington with his knuckleball for eight innings, Ozzie Albies had three hits and Atlanta won at home.

After Ryan Zimmerman’s leadoff homer in the second, the 42-year-old Dickey gave up only one hit – a two-out single by Trea Turner in the third – over the next five innings. Turner was picked off first base.

CARDINALS 8, REDS 5: Dexter Fowler delivered again, getting three hits and driving in two runs as St. Louis overcame Scott Schebler’s two home runs to win at Cincinnati for a three-game sweep.

Fowler went 7 for 13 with two home runs and six RBI in the series. Yadier Molina drove in two runs as the Cardinals completed their first sweep in Cincinnati since 2010.

AMERICAN LEAGUE

INDIANS 4, ANGELS 1: Shortstop Francisco Lindor homered at Anaheim, California, to lead Cleveland to a three-game sweep and its 27th win in its last 28 games.

The record for victories with only one loss is 29, set by the 1884 Providence Grays.

ORIOLES 3, RAYS 1: Gabriel Ynoa pitched eight innings of five-hit ball, Manny Machado homered and Baltimore won at home in a matchup between fading AL East teams.

Machado’s two-run homer in the first off Matt Andriese (5-4) propelled the Orioles to their third win in 15 games. Baltimore has only a mathematical chance of reaching the postseason and must go 7-1 the rest of the way to avoid its first losing season since 2011.

ROYALS 1, BLUE JAYS 0: Jason Vargas and four relievers combined on a two-hitter, Melky Cabrera had three hits and the game’s only RBI, and Kansas City won at Toronto.

Vargas (17-10) struck out seven in 61/3 innings to win his third straight start. None of the three batters he walked advanced beyond first base.

TWINS 12, TIGERS 1: Joe Mauer and Jorge Polanco had three hits each, and Minnesota won at Detroit to extend its lead for the American League’s second wild card.

NOTES

RAUL MONDESI, a former Los Angeles Dodgers star, was sentenced to eight years in prison after being convicted of embezzlement during his term as mayor of his hometown in the Dominican Republic.