LOS ANGELES (AP) — Pinch-hitter Kike Hernandez delivered the go-ahead, two-run double during the Dodgers’ five-run seventh inning, and Los Angeles rallied from a three-run deficit for a wild 10-7 victory over the Oakland Athletics on Wednesday night.

Yasiel Puig hit a two-run homer on his bobblehead night for the Dodgers (57-45), who snapped their three-game losing streak and avoided falling out of first place for the first time in two months.

READ MORE: Irv Cross, Former Rams Player And Broadcast Pioneer, Dies At 81

Puig added an RBI single in the seventh, capping the Dodgers’ comeback after the last-place A’s scored four runs in the top half of the seventh to take a 6-3 lead.

Brett Lawrie had a ninth-inning homer among his career-high four hits and four RBIs for Oakland, which has lost five of six.

Lawrie and Eric Sogard drove in two runs apiece for the A’s in the seventh, but the Dodgers replied with a gritty two-out rally.

Adrian Gonzalez and Yasmani Grandal delivered run-scoring hits off Drew Pomeranz (4-4) before Hernandez drilled a double to the left-center gap in his first plate appearance since last Friday.

Howie Kendrick added a two-run single in the eighth for Los Angeles, which has been in first place since May 29 — and for all but one day since April 16. The Dodgers, who lead San Francisco by a half-game, are the only team in the majors without a four-game skid this season.

Pedro Baez (3-2) got two outs in the seventh.

Pomeranz gave up three hits and three runs without recording an out in the seventh.

Mike Bolsinger yielded eight hits and three walks over five innings as a late replacement for Clayton Kershaw, who was scratched earlier in the day with hip soreness.

READ MORE: Families Of Loved Ones Lost To COVID-19 Push For National Day Of Mourning

Jesse Chavez gave up five hits and three runs in five innings for Oakland.

Andre Ethier had an RBI single in the first inning, and he doubled in the fourth before Puig’s drive barely got over the fence in left for his seventh homer. When the Cuban right fielder returned to the dugout, Adrian Gonzalez grabbed Puig’s head and shook it back and forth, bobblehead style.

Along with his doll giveaway, Puig also played catcher while his mother, Maritza, threw out the ceremonial first pitch.

TRAINER’S ROOM

Athletics: Switch-pitcher Pat Venditte will throw back-to-back rehab games for Triple-A Nashville this weekend, and could rejoin the A’s after that.

Dodgers: Kershaw felt soreness in his hip earlier in the week, so the club elected to hold back the NL MVP and Cy Young winner for two days.

UP NEXT

Athletics: Chris Bassitt (0-3, 2.94 ERA) takes the Coliseum mound in the opener of a four-game series against Cleveland.

Dodgers: After a day off, Kershaw (8-6, 2.51 ERA) is expected to take his 29-inning scoreless streak into the Freeway Series opener against the Angels.

MORE NEWS: LA City Vaccine Sites Set To Reopen Tuesday, With Mostly Second-Dose Appointments

(© Copyright 2015 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)