LOS ANGELES — Clayton Kershaw combined with two relievers on a four-hit shutout, Enriquè Hernàndez had a pinch-hit grand slam to highlight a six-run seventh, and the Los Angeles Dodgers routed the rival San Francisco Giants 9-0 Tuesday night.

Kershaw (7-1) allowed three hits, struck out six and walked two. The left-handed ace improved to 23-11 in his career against the Giants, who suffered their largest loss of the season.

Dylan Floro struck out three in the eighth and Joe Kelly finished it off in the ninth, giving up a hit and a walk to go with one strikeout.

Hernàndez slugged his second career grand slam off Trevor Gott after coming in 2 for 15 on the homestand. He was intentionally walked after entering in the sixth.

The Dodgers batted around in the seventh while extending their lead to 9-0.

Pinch-hitter David Freese got the scoring started with an RBI groundout to third base and Austin Barnes added an RBI single. Hernandez cleared the bases with a 416-foot shot to left field.

The victory kept the Dodgers from losing two in a row at home for the first time since mid-April after they dropped the series opener 3-2. They had 14 hits and left 10 runners on base.

Rookie Shaun Anderson (2-2) gave up three runs and seven hits in 5 2/3 innings. The right-hander struck out two and walked three.

The Dodgers jumped on Anderson in the first, taking a 2-0 lead. Joc Pederson hit his 19th homer leading off the game and Justin Turner doubled in the other run.

Chris Taylor reached on a bunt single in the sixth when no one was covering first after Brandon Belt got pulled off, making it 3-0.

TRAINER'S ROOM

Giants: INF Pablo Sandoval got the day off against left-handed pitching after injuring his right pinky finger when it was stepped on by a baserunner. He's day to day with four stitches in his finger.

Dodgers: RHP Kenta Maeda (sore right wrist) took a comebacker off his wrist Monday. X-rays were negative and he'll get an extra day of rest before his next start. ... LHP Scott Alexander (forearm) will have a minor league rehab assignment next week. ... OF A.J. Pollock (sore right elbow) will work out at the team's spring training facility in Arizona before going on a rehab assignment.

MOVING OVER

Left fielder Pederson took grounders at first base and Dodgers manager Dave Roberts indicated a position change is in the future. The move would keep Pederson's home-run hitting bat in the lineup. The outfield is already set: Pollock is expected back after the All-Star break, rookie Alex Verdugo has proven reliable and Cody Bellinger has moved from first base to protect his shoulder. Max Muncy alternates between second and filling in for Turner at third. "(Joc) is actually more excited about playing first base than I've seen him excited about anything, outside of hitting a homer," Roberts said.

SPOT STARTER

A spot starter will be added to the Dodgers' rotation in the next three or four days, said Roberts who didn't name the person. It's needed while Maeda gets rest.

FAMILY TIES

Actress Kelley Jakle, the great-granddaughter of Dodgers GM Branch Rickey who signed Jackie Robinson, sang the national anthem. Kershaw's children, 4-year-old Cali and 2-year-old Charley, tossed first pitches from the mound on the fifth anniversary of their father's no-hitter against Colorado. Neither ball got very far, with the elder Kershaw and Russell Martin handling catching duties.

UP NEXT

Giants: LHP Drew Pomeranz (2-6, 6.43 ERA) has been better in his last two starts than in his previous 10 when he had an 8.08 ERA.

Dodgers: LHP Rich Hill (4-1, 2.60) has dominated against the Giants since he came to L.A., going 6-1 with a 1.81 ERA.