Orlando Ramirez-USA TODAY Sports

Nelson Cruz drew a four-pitch, bases-loaded walk from Padres closer Josh Hader with one out in the ninth inning Thursday night to break a tie, leading the visiting Washington Nationals to a 3-1 victory over the San Diego Padres.

Keibert Ruiz followed with a sacrifice fly for the Nationals' final run in the opener of a four-game series.

Cesar Hernandez opened the inning with a single to right off Padres starter Yu Darvish, who then retired Joey Meneses on an infield popout. Alex Call singled to center, prompting Padres manager Bob Melvin to replace Darvish with Hader.

The left-hander, who was making his first appearance since Aug. 9, hit former Padre Luke Voit with a full-count pitch to loaded the bases before walking Cruz to force in Hernandez. Call scored on Ruiz's flyout.

Carl Edwards Jr. (5-3) pitched a perfect eighth to earn the win. Kyle Finnegan registered his sixth save, walking two batters with one out in the ninth before inducing a game-ending, double-play grounder from pinch hitter Jurickson Profar.

Darvish (10-7) took the loss despite a strong outing. In 8 1/3 innings, he gave up three runs on five hits and no walks with six strikeouts.

Darvish and Nationals starter Anibal Sanchez battled to a 1-1 draw that extended into the ninth inning. Each served up a solo homer early in the game.

With two outs in the third inning, Washington's Ildemar Vargas hit his second homer of the season, a drive into the right field stands. Darvish then retired the next eight hitters he faced before Vargas singled with one out in the sixth. Darvish retired seven more Nationals before Lane Thomas had a two-out, infield single in the eighth.

San Diego's Manny Machado tied the game with one out in the fourth inning, driving his 22nd homer of the season into the left field seats on a 3-0 count. That was the only hit Sanchez allowed in his five-inning stint. He walked two and struck out four.

The Padres loaded the bases with one out in the seventh on singles by Jake Cronenworth and Ha-Seong Kim and a walk to Austin Nola. However, Washington reliever Victor Arano struck out Trent Grisham and Juan Soto to keep the game tied.

More must-reads:

TODAY'S BEST
Hurricanes' power play finally comes through with season on the line
Watch: An outstanding first half by Donovan Mitchell keeps the Cavaliers alive in Game 3 vs. Celtics
Mavericks come from behind to down Thunder, take 2-1 series lead
Tigers lose veteran starting pitcher to injury
Justin Allgaier dominates at Darlington for first win of 2024
Watch: Minor league baseball game interrupted by turtle delay
Rangers ace continues to be plagued by nerve irritation in thumb
Cowboys hint at timeline for extension talks with offensive star
Steelers first-round pick has already 'apologized' to new locker mate
Former Packers WR makes bold prediction about Jordan Love
Watch: Paul Skenes wastes no time showing why Pirates drafted him No. 1 overall
Broncos release former Super Bowl champion WR
Nationals had 'substantive discussions' with former top prospect about extension
Patriots make unsurprising decision on top executive
Cowboys release veteran WR
Longtime Steelers DT Cameron Heyward hints contract extension is coming
'Great mind': One-time NBA champion endorses candidate for Lakers HC job
Jrue Holiday jokes about beating departing Celtics assistant who just landed Hornets job
Orioles manager explains Craig Kimbrel's new role
Rays activate key bullpen arm from injured list