Pitching and just enough hitting got the Dodgers back to winning.

Julio Urías threw seven shutout innings for his major league-leading 17th victory, Max Muncy slugged a two-run homer and Los Angeles beat the San Diego Padres 3-0 on Friday night to snap a two-game skid.

"It was really important for us to get ahead of this series," Urías said through a translator. "On a personal note, very great to get those victories."

Urías (17-3) scattered three hits, struck out seven and walked one to remain unbeaten in his last 13 starts, going 8-0 in that stretch. The left-hander hasn’t lost since June 21 at San Diego.

"He's a front-line starter and when he takes the baseball, we expect to win," manager Dave Roberts said. "For him to go deep tonight shows his growth and maturity."

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Padres All-Star shortstop Jake Cronenworth got hit on his left hand by a pitch in the third and later left the game. Manager Jayce Tingler said Cronenworth has a small fracture on his left ring finger and will be re-evaluated over the next few days.

Kenley Jansen pitched the ninth for his 31st save.

The Dodgers remained 2 1/2 games behind NL West-leading San Francisco and improved to a major league-best 47-23 at home with their 15th shutout.

Muncy’s 32nd homer off Joe Musgrove (10-9) gave the Dodgers a 2-0 lead in the third. Mookie Betts singled for the Dodgers' first hit of the game and scored on Muncy's shot to right.

Musgrove gave up three runs and four hits in six innings. The right-hander struck out seven and walked a season-high five.

"Just didn’t have a great arsenal to work with," Musgrove said. "The walks obviously hurt me a lot. Just a lot of wasted pitches, a lot of extended innings. I made the night a lot harder on myself than I needed to."

The Dodgers extended their lead to 3-0 in the fourth. Chris Taylor’s sacrifice fly scored Will Smith, who doubled and took third on Musgrove’s wild pitch.

The Padres had just two runners reach second base until the eighth. Blake Treinen gave up back-to-back, two-out singles to Ha-Seong Kim and Fernando Tatis Jr., putting the tying run at the plate. But Wil Myers struck out swinging to end the threat.

Former Dodger Manny Machado, who was booed heartily, went 0 for 3 with a walk. Tatis was 2 for 4 with two strikeouts in the Padres’ third straight loss.

Mired in an offensive slump, Taylor made two stellar defensive plays in center field. He had a snow-cone catch against Myers in the fourth and robbed Machado of a two-run homer at the wall to end the fifth.

"He was sitting on that pitch all night, he was working me to make that pitch," Urías said. "I thought it was going to go over the fence. Luckily, it didn’t and it was a great play by Chris."

Taylor nearly nabbed a third catch. A ball hit by Myers went off the tip of Taylor’s glove for a two-out double in the sixth.

San Diego fell into a tie with Cincinnati for the second NL wild card.

"Everyone is in that lull right now of feeling we can’t get things right," Musgrove said. "Underperforming the last month and a half has really set us back."

MAKE OR BREAK

The Padres opened a crucial 10-game road trip in their bid to secure the second NL wild card spot.

They have the toughest remaining strength of schedule at .605, and the fewest remaining home games in the majors with six.

All of the Padres’ remaining games are against opponents that currently own winning records, and they’re the only team in baseball without any upcoming games against teams that are currently .500 or worse. They're 37-31 against teams with winning records.

DODGERS MOVES

The Dodgers recalled infielder-outfielder Matt Beaty for his third stint with them and recalled infielder Gavin Lux for his second stint.

Beaty has batted .262 with five home runs and 34 RBI in 105 games.

Lux has hit .221 with six homers and 37 RBI in 85 games. He went 0 for 2 with a walk before being replaced in the outfield, where he played for the first time in his big league career.

Outfielder Billy McKinney went on the injured list with left hip impingement. He’s split the season between Milwaukee, New York and Los Angeles, batting a combined .192 with nine homers and 27 RBI in 116 games. In 37 games with the Dodgers, McKinney has hit .146 with one homer and seven RBI.

The team optioned right-hander Andre Jackson a day after he was recalled but didn’t appear in a game. Jackson is 0-1 with a 1.04 ERA and seven strikeouts in two major league games this season.

TRAINER'S ROOM

Dodgers: LHP Clayton Kershaw is expected to start Monday against Arizona and pitch four innings. He's been on the injured list since July 7 with elbow inflammation. ... LHP Danny Duffy (forearm) threw a bullpen.

UP NEXT

Padres: RHP Chris Paddack (7-6, 4.95 ERA) makes his third start since returning from the IL.

Dodgers: RHP Walker Buehler (13-3, 2.31) is unbeaten in eight career starts against the Padres, going 4-0 with a 1.54 ERA. The Dodgers are 6-2 in those games.