Yankees' Aaron Judge homers for a second straight game against...

Yankees' Aaron Judge homers for a second straight game against the Giants during the fifth inning on Saturday in San Francisco. Credit: Getty Images/Brandon Vallance

SAN FRANCISCO — After consecutive shutouts to open the season, the Yankees finally allowed a run Saturday night.

But not much else.

Behind a third straight solid outing from their starter, more stellar work from the bullpen, four double plays on defense and a second homer in as many games by Aaron Judge, the Yankees completed a sweep of the Giants with a 3-1 victory in front of a sellout crowd of 40,634 at Oracle Park.

The Yankees, off to a 3-0 start for a second straight year, are off Sunday before starting a three-game series in Seattle Monday night.

“Look, wins are always hard to come by,’’ Aaron Boone said. “You take ’em when you can get ’em. I loved that we played well, but it’s March.”

Said Judge: “That’s what you want to do. There’s still a lot of ballgames to play . . . The past couple years, we’ve struggled kind of finishing off series, sweeping series, so we just tried to make it a point, pregame today we talked about it, ‘Hey, we’ve got to close out a series.’ That’s what’s going to make a difference between winning the division or ending up tied and losing [a tiebreaker]. Every game matters.”

David Bednar allowed the first two batters to reach base in the ninth but struck out Harrison Bader before getting Patrick Bailey to hit into a game-ending 4-6-3 double play.

Will Warren, coming off an electric spring training, wasn’t sharp but limited the damage, allowing one run, five hits and two walks in 4 1⁄3 innings in which he struck out three.

The bullpen, terrific in the first two games, again was solid, with Brent Headrick, Jake Bird and Tim Hill bridging to Bednar.

Yankees pitchers allowed 13 hits and seven walks in 27 innings in the three games, striking out 27, and recorded a 0.33 ERA and 0.74 WHIP.

The newly implemented ABS (automatic ball-strike) system helped the Yankees get on the board in the third.

With one out, Trent Grisham was called out on strikes but challenged the call and it was overturned. Grisham walked and, after Judge struck out, Cody Bellinger singled and Ben Rice hit a 376-foot two-run double off the rightfield wall to make it 2-0.

The Yankees went 3-for-3 in challenges, with Austin Wells going 2-for-2 behind the plate.

After the Giants snapped their season-opening scoreless streak at 20 innings in the bottom of the third on Jung Hoo Lee’s double and Matt Chapman’s RBI single, Judge homered to leftfield in the fifth to make it 3-1.

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME