The Giants (9-13) couldn’t finish off a sweep of the Washington Nationals on Sunday afternoon at Nationals Park, ending their three-city, nine-game road trip with a 3-0 shutout loss.

“The vibe and the approach we had going into the game and the first five or six innings was really, really good,” manager Tony Vitello told reporters in Washington, D.C. “It’s a lot easier to be energetic or celebrate or look like things are going well for you when you’re getting rewarded or you find a way to manufacture stuff on offense.

“We just didn’t have anything going against the three guys they threw up against us. I think that played into it a lot.”

After totaling 17 runs in the first two games of the series, San Francisco went 0-for-11 with runners in scoring position despite totaling eight hits, one more than the Nationals.

San Francisco finishes up its three-city, nine-game road trip against the Baltimore Orioles, Cincinnati Reds and Nationals with a 4-5 record, dropping two of three versus Baltimore and Cincinnati before taking two of three against the Nationals.

Robbie Ray (2-3) recorded his second quality start of the season, allowing three runs over six innings with seven strikeouts, but he took his third loss of the season after receiving no run support.

Opposite Ray, the Nationals started the game with PJ Poulin, an opener, followed by a pair of bulk relievers in veteran Miles Mikolas and rookie Andrew Alvarez. Alvarez, in particular, was exceptional, tossing 4 1/3 scoreless frames with five strikeouts to no walks.

“It’s tough because I feel like I made one bad pitch today,” Ray told reporters in D.C. “That was it. I made every pitch that I wanted to make except for that one (to Mead). I guess the positive out of that is, I don’t know how many I threw, but over 90 pitches were exactly what I wanted to do.

“I threw some really good curveballs today, some really good sliders. Kept them off balance the whole time and was still able to keep us in it even though the homer is not ideal.”

The Giants put runners on first and second with two outs in the top of the first, prompting rookie manager Blake Butera to pull Poulin and bring in Mikolas. It was a bit of a surprising move since bulk relievers typically start with clean innings, but the move worked in Butera’s favor as Mikolas retired Casey Schmitt to end the inning.

Following four scoreless innings on both sides, the Nationals scored the first run of the game in the bottom of the fifth thanks to an ugly defensive sequence by San Francisco.

With no outs and Nasim Nuñez on second base, Keibert Ruiz hit a line drive to left-center field that left fielder Heliot Ramos couldn’t corral. The ball hung in the air long enough for Ramos to make the play, but Ramos took an inefficient route and allowed the ball to fall despite making a diving effort.

Ramos, from his backside, heaved a throw to shortstop Willy Adames. With Nuñez trying to score, Adames fired a one-hop strike to catcher Patrick Bailey. Adames’ throw arrived in time and Nuñez didn’t even slide, but Bailey couldn’t cleanly receive the ball and Nuñez scored, giving the Nationals a 1-0 lead.

The mistakes by Ramos and Bailey compounded when the Nationals’ Curtis Mead hit a two-run homer two batters later, expanding Washington’s lead to 3-0. Ray was charged for three earned runs, but his defense didn’t do him any favors in that frame.

The Giants had an opportunity to get on the scoreboard in the top of the eighth when Matt Chapman reached on an error and Rafael Devers followed with a single, but squandered the opportunity. Casey Schmitt grounded into a double play, and Jerar Encarnacion (pinch-hitting for Jung Hoo Lee) struck out swinging.

Up next: Following an off day on Monday, the Giants will welcome the back-to-back reigning World Series champion Los Angeles Dodgers to Oracle Park for a three-game set. Right-hander Landen Roupp (3-1, 2.38) will take the mound for the Giants on Tuesday night against 2025 World Series MVP Yoshinobu Yamamoto (2-1, 2.10 ERA).