CINCINNATI (AP) — Yasmani Grandal and Justin Turner drove in three runs each, and the Los Angeles Dodgers beat Cincinnati 8-1 on Wednesday to avoid a season sweep by the last-place Reds.

Joc Pederson homered for the Dodgers, and Grandal had three hits.

Los Angeles began the day 1 1/2 games behind NL West-leading Colorado and three games back of St. Louis for the second NL wild card. The Dodgers had been 0-6 against the Reds and were on the verge of being swept by Cincinnati in a season for the first time.

Cincinnati’s Scooter Gennett went 1 for 4, keeping his NL-leading batting average at .321.

Left-hander Caleb Ferguson (6-2), the third of seven Dodgers pitchers, struck out three in the fifth.

Anthony DeSclafani (7-5) allowed six runs — five earned — five hits and three walks in 4 2/3 innings. Jose Peraza put Cincinnati ahead with his first inning homer, but Pederson tied it 1-1 with a leadoff drive in the fourth, his second two games and 21st this season.

Grandal hit a go-ahead double later in the inning, a ball caught by a young fan with a glove reaching over the wall with the ball still in play. Max Muncy scored from first and Reds manager Jim Riggleman argued unsuccessfully he should have been stopped at third, but the umpires’ decision was upheld in a video review. Turner hit a two-run single in a four-run fifth.