DENVER — Clayton Kershaw struck out five to inch closer to 3,000, Shohei Ohtani hit his 28th home run, and the Los Angeles Dodgers beat the Colorado Rockies 3-1 on Thursday.

Kershaw (4-0) struck out five in six innings for his fourth straight win and has 2,997 strikeouts over his 18-year career — three short of becoming the 20th major leaguer to reach 3,000.

The 37-year-old would be the third active pitcher to reach the mark behind Justin Verlander and Max Scherzer. Verlander, in his 20th season, has 3,468 strikeouts. Scherzer has 3,412 in 18 seasons.

“I knew I had eight to go,” Kershaw said. “Eight in Colorado is never going to be easy to do. I felt good. But pitched well, got through six. A chance to strike out three at home would be really cool.”

Kershaw’s next start is expected to come at Dodger Stadium next Wednesday (July 2) against the Chicago White Sox.

“He’s certainly competing, making pitches,” manager Dave Roberts said. “I think he has gotten better each time out, even with not the best of stuff. He just found a way to be efficient.”

Ohtani’s 419-foot homer to right-center gave the Dodgers a 3-1 lead in the seventh.

Mookie Betts had two hits and an RBI and Freddie Freeman had an RBI single for the Dodgers, who have won 10 in a row against the Rockies — six this season.

The Dodgers, who trailed 1-0 after Brenton Doyle homered off Kershaw in the second, had their major league-high 31st comeback victory.

Tanner Scott pitched the ninth for his 17th save in 21 chances.

The Rockies (18-63) had two hits, none after the third inning, and were swept for the 12th time this season. Their 63 losses in the first 81 games are the most in the modern era.

Kershaw retired the first five, three on strikeouts, before Doyle homered on a first-pitch slider with two outs in the second for a 1-0 lead.

He struck out Tyler Freeman for the second out of the sixth inning and left the game after retiring the next batter. He threw 69 pitches, 41 for strikes.

“You always want to be efficient, no matter what,” Kershaw said. “My days of throwing 115 pitches is probably over. Getting through six is probably the biggest thing at Coors Field.

“Doc (Roberts) is doing a good job of protecting me, which I appreciate. I just want to be able to go back out there every fifth, sixth day. Whatever that means is good for now.”

Miguel Rojas doubled and scored on Betts’ infield single to tie it at 1-1 in the third. Betts doubled to open the sixth off reliever Angel Chivilli (1-3) and scored on Freeman’s single for a 2-1 lead.

Colorado starter Austin Gomber gave up one run and four hits in five innings, with one strikeout and one walk.

Kershaw has made eight starts this season after being activated from the injured list May 17 following offseason left knee and foot surgeries.

“He has given us a shot in the arm,” Roberts said. “We’re sort of ailing on the starting pitching side. Coming in and giving us valuable innings. I just love that kind of edge that he gives on start day. We certainly feed off that.”

Kershaw won his fourth straight game, and his ERA dropped to a season-low 3.03.

Andy Pages caught Thario Estrada’s fly with one out in the ninth, and his one-hop throw to Freddie Freeman at first base doubled off Tyler Freeman to end the game.

Clayton Kershaw has given up four earned runs in his last four starts, dropping his ERA to a season-low 3.03

Dodgers RHP Dustin May (4-5, 4.46 ERA) will face Royals LHP Noah Cameron (2-3, 2.08) in the first game of a three-game series in Kansas City. Rockies LHP Kyle Freeland (1-8, 5.13) is set to be activated from the injured list to oppose Brewers LHP Jose Quintana (5-2, 2.98) in the first game of a three-game series in Milwaukee.