LOS ANGELES (AP) Yasiel Puig has said he's matured, and that's why he's hit so well early this season. Whatever it is, the Los Angeles Dodgers will welcome more of it.

Puig homered and drove in four runs to help the Dodgers overcome a sloppy defensive game to beat the Arizona Diamondbacks 8-4 on Saturday night to celebrate Jackie Robinson Day.

He also hit a sacrifice fly in the first inning, singled twice and walked for a team-high 10th time. This performance came with all the players wearing No. 42 in honor of Robinson, and Puig thinks he might have found a lucky charm in the number.

''I think I'm going to have to wear under my jersey every day,'' Puig said.

Puig's three-run home run in the eighth was his fourth of the season and came while the Dodgers were trying to hang on to a one-run lead.

Alex Wood (1-0) pitched 3 1/3 scoreless innings of relief to earn the win and Kenley Jansen got the last four outs for his third save of the season.

Los Angeles went ahead 5-4 in the fifth on catcher Chris Herrmann's throwing error - one of five errors in the game - before Puig padded the lead with his three-run shot in the eighth off closer Fernando Rodney.

Austin Barnes also went deep for the Dodgers, getting his first career homer.

Nick Ahmed homered and drove in all four runs for Arizona, which had only five hits on the night.

''That's baseball,'' Arizona third baseman Jake Lamb said. ''You're going to score runs sometimes, you're going to put up one run and win the game sometimes. That's how the game works, so you can't sit here and get frustrated by the offense.''

Diamondbacks left-hander Patrick Corbin (1-2) started but struggled in his six innings, giving up five runs - three earned - and nine hits with three walks.

Kenta Maeda lasted only four innings for the Dodgers, allowing four runs and four hits with a walk. He went only five innings in each of his first two starts.

With runners on the corners in the fifth and the score tied 4-4, Scott Van Slyke broke from first on a steal attempt. Herrmann faked a throw to second and had Enrique Hernandez caught drifting down the third base line, but his throw to third hit Hernandez in the back and went into left field, allowing Hernandez to score.

The Dodgers opened the scoring with two runs in the first. Logan Forsythe doubled and scored on Seager's single to center. After Turner's league-best seventh double, Seager scored on Puig's sacrifice fly. Barnes' homer made it 3-0 in the second.

Arizona took a brief 4-3 lead in the fourth when Brandon Drury doubled and scored on Ahmed's single up the middle.

After Ahmed's homer, the Dodgers tied it back up in the bottom of the second with an unearned run. Van Slyke reached on Ahmed's throwing error, moved to third on Forsythe's single to center and scored on Seager's sacrifice fly. Los Angeles had the bases loaded with two outs, but Adrian Gonzalez grounded out to shortstop Ahmed to end the inning.

The Dodgers committed three errors on the night, and the Diamondbacks had two.

TRAINER'S ROOM

Dodgers: Forsythe left the game after the fourth inning for what the Dodgers called precautionary reasons after his right hamstring tightened up. He was 3 for 3. Said Forsythe: ''It didn't pop or grab so my level of concern is not high.''

UCLA CONNECTION

Both managers in this series played at UCLA, though never together. Dodgers manager Dave Roberts and Diamondbacks manager Torey Lovullo were reunited with ex-UCLA head coach Gary Adams prior to Saturday's game.

HERNANDEZ VERSATILITY

Hernandez showed his value. He started the night in left and later was moved to second, where he made a couple of excellent defensive plays, one in the eighth that saved a run when he caught an overhead fly in front of a charging Puig. Said Roberts: ''He's fearless. That was a huge out and it could have changed the game.''

UP NEXT

Diamondbacks: RHP Taijuan Walker (1-1) starts the series finale. He's had one career start against the Dodgers, losing 5-2 on April 15, 2015.

Dodgers: LHP Rich Hill (1-0) comes off the disabled list to make his second start of the season. Hill developed a blister on his left index finger in his April 5 start against the Padres.

Copyright 2017 by Associated Press. Any commercial use or distribution without the express written consent of Associated Press is strictly prohibited.