Matt Beaty homered to end a 12-inning scoreless streak, Corey Seager also connected and Los Angeles beat the San Francisco Giants 5-0 to reduce their magic number to clinch the NL West to two.
"Getting us on the board was a sigh of relief a little bit," Dodgers manager Dave Roberts said. "It's just one of those things that we haven't been putting hits together, and so with two outs to get a walk and put a crooked number on the board, and to get a lead, was a good thing."
The Dodgers (93-52) can lock up their seventh consecutive division title Tuesday at Baltimore when they open a three-game series.
After Beaty's two-out, two-run homer in the fourth inning, Corey Seager added a three-run shot in the fifth as the Dodgers increased their NL-record homer total to 255. They are 79-33 in games when they hit a home run. This year's Twins hold the major league record with 274 homers.
Kenta Maeda (9-8) replaced Julio Urias after two innings and threw four innings of dominant relief, retiring his first 10 batters. The Japanese right-hander is being transitioned into a relief role for the postseason to help an inconsistent bullpen. He gave up one hit and struck out six.
"It just looked like he was more aggressive and with two strikes he wasn't relying on the slider as much," Dodgers catcher Russell Martin said. "He did a good job of playing the cat-and-mouse game with the slider and the fastball."
Giants manager Bruce Bochy was on the bench for the last time in a game at Dodger Stadium before he retires after the season. He finished 107-108 in the ballpark and has the most victories of any visiting manager there.
Bochy will end his managerial career with three games against the Dodgers at San Francisco from Sept. 27-29. He still needs five victories for 2,000.
"I have been fortunate to be able to experience all these (Dodgers-Giants) games," Bochy said. "We played a lot of close games over the years. That's how we play each other."
The Giants had a pair of one-run victories in the opening two games of the series and were even with the Dodgers in the fourth until Beaty drilled his ninth home run of the season. The homer came on a changeup that was up in the zone from right-hander Dereck Rodriguez (5-9), who had been giving the Dodgers fits with the pitch in the early innings.
One inning later, Seager hit a shot to center off Rodriguez, his 14th of the season. After A.J. Pollock followed with a walk, Rodriguez's day came to an end, giving up five runs, three hits and three walks over 4 2/3 innings with four strikeouts.
"That's why I feel more frustrated than probably any other outing; I felt really good," said Rodriguez, who entered off a solid start at St. Louis when he gave up one earned run over seven innings. "The one to Seager was down and he just put a good swing on it. I still felt I threw the ball well. I was in and out of the zone."
Urias had been under consideration to be a starter in the postseason, but Roberts said after the game the lefty will be transitioned into a relief role for the upcoming series at Baltimore. Urias worked around traffic Sunday, giving up two hits in the first inning and a leadoff bunt single to Mike Yastrzemski in the second, but did not allow a run.
This was Urias' second appearance since returning from a 20-game suspension under MLB's domestic violence policy.
Justin Turner's one-game suspension for bumping umpire Rob Drake on Aug. 26 has been rescinded, but the Dodgers third baseman was still out of the lineup Sunday. Turner has been dealing with a minor ankle issue since Friday and was replaced by a pinch runner late in Saturday's game. He is expected to return to the starting lineup Tuesday.
Turner appealed the suspension, claiming Drake was the one who bumped into him. Even though the one-game ban was lifted, Turner was still required to pay an undisclosed fine.
Giants: RHP Johnny Cueto will make his return from Tommy John surgery on Tuesday at home against the Pittsburgh Pirates. The original plan was to have Cueto start in the just-completed series at Los Angeles, but a bout of back tightness nixed those plans.
Dodgers: RHP Joe Kelly still is dealing with leg soreness, but the reliever did pitch a scoreless inning Saturday against the Giants.
Giants: LHP Madison Bumgarner (9-8, 3.81 ERA) will take the mound Monday at home in the opener of a four-game series against the Pirates, coming off an outing at St. Louis when he matched a season high by allowing six earned runs.
Dodgers: After day off Monday, the Dodgers will open a three-game series at Baltimore with Walker Buehler (12-2, 3.28) on the mound.
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports
Beaty, Seager go deep in Dodgers' win
Matt Beaty homers in the fourth inning and Corey Seager follows suit with a fifth-inning shot in the Dodgers' 5-0 victory against the Giants.