LOS ANGELES — Robbie Ray struck out 12 — one off his season high — and had nothing to show for it.

Arizona’s offense failed to back him in a 3-1 loss to the NL West-leading Los Angeles Dodgers on Wednesday night, sending the Diamondbacks home with a 3-5 record on their road trip. They were outscored 18-5 in losing the three-game series to the Dodgers.

Ray (7-13) gave up three runs and two hits in six innings. The left-hander walked four, including three in the first inning.

“The first inning I was just having trouble feeling my pitches, feel for my fastball and the breaking stuff,” he said. “After that I found all of them and they just started working for me.”

Arizona’s lone run came on Paul Goldschmidt’s RBI double with two outs in the first.

Yasiel Puig homered with one out in the sixth, extending the Dodgers’ lead to 3-1.

“It was a curveball,” Ray said. “I was trying to backdoor it and it just didn’t break enough. He is a strong hitter and even though he might have got it off the end of the bat, he is strong enough to hit it out.”

Ray struck out 10 or more batters for the fourth time this season.

“He had very good stuff, a lot of strikeouts again,” Arizona manager Chip Hale said. “We need to score some runs.”

Brock Stewart became the fourth consecutive rookie pitcher to win his start for the Dodgers, who have won five straight.

The Dodgers increased their lead to a season-high five games over San Francisco, which lost 6-5 at Colorado.

Stewart (1-2) allowed one run and five hits in five innings, struck out one and walked two. The Dodgers started four consecutive rookies for the second straight week while their battered rotation slowly comes back. Jose De Leon took the mound Sunday and Kenta Maeda went Monday, followed by Ross Stripling on Tuesday. All four won.

Kenley Jansen pitched the ninth for his 43rd save in 49 chances, leaving him one shy of his career-high set in 2014.

Los Angeles scored the tying and go-ahead runs in the bottom of the first. Corey Seager doubled into the right field corner, bringing home Howie Kendrick who had walked and narrowly avoided getting tagged in a head-first slide at the plate. Puig’s sacrifice fly scored Seager, making it 2-1.

Clinging to a 3-1 lead, the Dodgers’ bullpen squelched threats in the seventh and eighth innings.

The D-backs loaded the bases in the seventh. Reliever Jesse Chavez gave up consecutive singles to pinch-hitter Phil Gosselin and Jean Segura before retiring the next two batters. He intentionally walked Goldschmidt and then struck out pinch-hitter Rickie Weeks Jr. to end the inning.

“Game on the line we thought that was our chance,” Hale said. “We always trust Rickie, he gives us good at-bats. Got the 3-2 and the guy made a good pitch on him.”

In the eighth, Pedro Baez came on and struck out Yasmany Tomas and Chris Hermann before walking pinch-hitter Mitch Haniger. He needed six pitches to retire Gosselin on a groundout to shortstop.

TRAINER’S ROOM

D-backs: C Welington Castillo was scratched shortly before the game with tightness in his shoulder and replaced by Hermann.

Dodgers: LHP Scott Kazmir experienced a setback in his rehab start at Triple-A Oklahoma City and left early with neck and ribcage issues. He will return to Los Angeles for further evaluation. He tossed 33 pitches and gave up a three-run homer, walked two and hit two batters.

UP NEXT

D-backs: RHP Braden Shipley (3-3, 4.94) starts the opener of a three-game home series against San Francisco. He is 2-0 with a 1.04 ERA in four starts when throwing six-plus innings.

Dodgers: LHP Clayton Kershaw (11-2, 1.79) starts Friday for the first time since June 26 after missing two months with mild disk herniation. He allowed a season-high five runs and seven hits in seven innings against Miami at home on April 26 in a 6-3 loss. He struck out 10 and didn’t issue a walk. Kershaw is 5-3 with a 2.40 ERA in 10 career starts against the Marlins.