On a night when the Los Angeles Dodgers honored a past Mexican-born pitching legend, an up-and-coming one was busy adding his name to history.

Julio Urías earned his major league-leading 18th victory, becoming the fourth Mexican-born pitcher to record at least that many wins in a season as the Dodgers beat the Arizona Diamondbacks 5-3 on Wednesday night.

"It was a really beautiful night," Urías said through a translator. "When I started getting warmed up you could hear the mariachi playing and see the excitement around the crowd. It was very nice for me to pitch tonight."

CLICK HERE FOR MORE SPORTS COVERAGE ON foxnews.1eye.us

Gavin Lux singled in the go-ahead run in the fourth and the Dodgers went on to complete a 6-0 homestand.

They gained ground on San Francisco for the first time in 11 days, moving within 1 1/2 games of the NL West-leading Giants, who lost 9-6 to San Diego. LA pounded out 14 hits in winning its sixth straight overall and ninth in a row at home, where the team is 52-23, tops in the majors.

"The main thing is we’re playing really good baseball overall," Dodgers manager Dave Roberts said. "We just got to keep going."

Lux went 2 for 4 and drove in two runs. Max Muncy went 2 for 5, drove in a run and scored another, and Justin Turner had three hits and two runs.

Urías joined Dodgers legend Fernando Valenzuela in winning at least 18 games in a season. The 25-year-old left-hander's .857 winning percentage also is the best by a Mexican-born pitcher, easily topping Jorge De La Rosa at .727.

Urías (18-3) wasn't as sharp as usual and left after 76 pitches, which was the plan.

"It was very tough to get in rhythm from my slider to my fastball," he said. "Credit to the bullpen, and for us to get this victory was important and stay on this winning streak."

Urías allowed two runs and three hits in five innings, struck out five and walked two as the Dodgers improved to 23-6 in his 29 starts. He retired nine of his first 10 batters and didn’t give up a hit until Christian Walker's single in the fourth.

"I felt right there at that point, going through the third time, we had different options and I liked our options," Roberts said. "For him to lead us to victory and for his 18th (win), it’s really remarkable and he’s not done yet."

Kenley Jansen struck out the side in the ninth to earn his 33rd save and 12th in a row.

Using Albert Pujols' bat for the second straight night, Muncy got the same result: a homer. He blasted his 34th of the season in the fifth, extending the Dodgers' lead to 4-2. He hugged Pujols in the dugout.

"It's a balanced bat and a lot of guys have a top-heavy bat. There's a little bit more barrel there," Roberts said of Pujols' bat. "I'll just defer to the Albert Pujols mojo."

The D-backs closed to 4-3 on Walker's solo shot off Phil Bickford's first pitch in the sixth.

The Dodgers answered in the bottom of the inning to go up 5-3. Trea Turner legged out an infield single, scoring pinch-hitter Matt Beaty, who was hit by a pitch.

Arizona led 2-1 in the fourth on Henry Ramos’ two-run single.

The Dodgers took a 3-2 lead in the fourth. Cody Bellinger grounded out to short, scoring Justin Turner, who singled. Lux singled in the go-ahead run. He had a bases-loaded RBI single in the second.

Merrill Kelly (7-10) gave up four runs and 10 hits in 4 2/3 innings after being out a month because of a positive test for COVID-19. The right-hander struck out one and walked two.

TRAINER'S ROOM

D-backs: LHP Tyler Gilbert went on the IL with elbow fatigue. He'll go back to Arizona to be evaluated. ... 1B Seth Beer (dislocated left shoulder) worked in the batting cage. He'll be re-evaluated and a decision on the injured list hasn't been made. ... OF Kole Calhoun (strained left hamstring) took batting practice and will play in an Arizona League game Thursday.

Dodgers: Muncy sustained a contusion to his right knee on a slide into second in the third. "He just hit the bag a little too hard," said Roberts, adding that Muncy will play Friday.

FANS ON FIELD

A man and a woman carrying signs and wearing blue shirts with the words "Free our kids. Abolish ICE" written on the back ran onto the field from the lower right-field seats in the top of the seventh. Eventually, they were each tackled by security. At the same time, a third person carrying a sign in the left-field corner was taken down on the warning track.

GREAT CATCH

A leaping Ramos picked off Mookie Betts' fly ball at the top of the wall in left and crashed to the ground with the ball securely in his glove to end the fourth. Kelly raised both arms in appreciation on the mound.

FERNANDOMANIA

The Dodgers marked the 40th anniversary of Valenzuela's rookie year with a bobblehead giveaway. He was the Cy Young and Rookie of the Year winner in 1981, when the Dodgers won the World Series.

Mike Brito, the scout who discovered Valenzuela in Mexico, was on hand, along with several members of the former pitcher's extended family. One of his granddaughters threw a strike to Valenzuela in the first pitch ceremony. His son, Fernando Jr., is a first baseman in the Mexican minors.

After the festivities, Valenzuela headed to the booth, where he works as the color commentator on the team's Spanish-language broadcast.

UP NEXT

D-backs: LHP Madison Bumgarner (7-10, 4.66 ERA) starts Friday at Houston in pursuit of his first road win since July 28 at Texas.

Dodgers: RHP Walker Buehler (14-3, 2.32) starts Friday at Cincinnati to open a nine-game road trip. He's 1-2 with a 2.92 ERA in four career starts against the Reds.