Scratching for some runs, the Los Angeles Dodgers got a little lucky. And sometimes, that's more helpful in the moment than being the defending World Series champions.

Will Smith’s pinch-hit sacrifice fly with the bases loaded in the seventh inning scored the tying and go-ahead runs when Josh Rojas dropped the ball in right field, helping the Dodgers rally past the Arizona Diamondbacks 4-2 on Wednesday night.

"You don't see that very often," Los Angeles manager Dave Roberts said. "That inning of at-bats was next level."

Mookie Betts followed with a ground-rule double after going hitless in his first three at-bats as the Dodgers capitalized on two walks and that glaring miscue by the Diamondbacks to take a 4-2 lead.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Arizona opened the bottom of the seventh by issuing back-to-back walks, including one by Joe Mantiply (0-1) to Gavin Lux that put two runners on. Pinch-hitter Albert Pujols’ blooper to shallow right field went off the glove of first baseman Pavin Smith, who tried to make the catch with his back to the infield and the ball coming down over his head. Instead, the single loaded the bases.

After Austin Barnes struck out, Will Smith’s line drive to right glanced off the edge of Rojas' glove and rolled away. Taylor and Lux scored as Smith reached on an error that sent Pujols to second. Betts’ ground-rule double to center made it 4-2, scoring DJ Peters, who ran for Pujols.

"The Albert ball, he was trying to call timeout on that pitch and got jammed," Roberts said. "We caught a break and that’s sometimes baseball. Yeah, we got a little good fortune, but we created some luck by making some plays ourselves."

Arizona has been outscored 16-4 in losing the first three games of the series. The Diamondbacks lost their fourth in a row overall and ninth straight on the road. They mustered just two hits.

"Maybe there is a little pressing mentality — we have to, we need to, we got to," manager Torey Lovullo said. "That’s not how the game should be played. It should be played with a very relaxed mindset."

Lovullo got all worked up in the fifth and was ejected. He argued a call of runner interference on pitcher Matt Peacock, who bunted and ran inside the line going to first before getting hit in the back of his left leg by Clayton Kershaw's throw.

"My understanding of the rule is he can be out of the baseline but it has to be a catchable ball," said Lovullo, who didn't realize the ball hit Peacock and didn't think plate umpire Will Little did, either. "We got into whether the ball was catchable. I felt it was and he felt it wasn’t."

Lovullo conceded that Little made the correct call after seeing a postgame replay.

Joe Kelly (1-0) retired the side in the seventh to earn the win. Kenley Jansen worked the ninth for his ninth save.

Yoshi Tsutsugo's opposite-field single in the fourth scored the Dodgers' first run, giving him his first RBI with the team since being acquired from Tampa Bay last weekend.

Arizona led 2-0 on Eduardo Escobar's two-run homer in the fourth off Kershaw.

The left-hander allowed two runs and two hits in six innings. He struck out eight and walked one.

Peacock quieted the World Series champion Dodgers in his second major league start. The right-hander gave up one run and four hits in 5 1/3 innings. He struck out four, walked none and retired his first 10 batters.

RARE PINCH HIT

Pujols got his first pinch hit since Sept. 5, 2009. It was his 3,255th career hit, tying him with Hall of Famer Eddie Murray for 13th place.

"When he comes up to bat with guys on base, we know exactly what he can do. He still hits the ball really, really hard," Kershaw said. "The attitude and personality he’s bringing to the clubhouse every day, he seems really excited to be here in his role."

MOVING UP

Jansen notched his 321st save, putting him third in career saves with one team and moving him ahead of Dennis Eckersley (Oakland). Jansen also tied Jose Mesa for 20th overall in major league history.

"It’s awesome," Jansen said. "Stuff like this don’t happen often, especially a bullpen guy. They get bounced around quite often."

TRAINER'S ROOM

Diamondbacks: Reinstated INF-OF Ketel Marte (right hamstring strain) from the injured list. He pinch-hit in the eighth. ... LHP Madison Bumgarner, who left Monday's start because of a left adductor spasm, will throw a bullpen Thursday. "He feels fantastic," Lovullo said.

UP NEXT

Arizona RHP Merrill Kelly (2-4, 5.24 ERA) is scheduled to start Thursday’s series finale, while the Dodgers go with a bullpen game.