The Dodgers had the best player in the world pitching against the major leagues’ lightest-hitting offense.

The Padres did not have the best version of Randy Vásquez pitching against what is by some measures the major leagues’ top offense.

So a series that began with a pair of one-run games and a hint of October ended with a game that wasn’t all that competitive — a 4-0 Dodgers victory on Wednesday night at Petco Park.

The Dodgers left San Diego having taken two of three games. They’ve extended their lead over the Padres to 1½ games in the National League West standings.

The Padres, who have had more quality starts thrown against them than any other team, did become the first lineup to get Ohtani out of a game before he completed six innings. But they did not score against him or the four relievers that followed him.

All the Dodgers really needed to win the rubber match in the series was Ohtani’s home run on the first pitch of the game, a blast that was more costly than just the lead it gave the Dodgers. Center fielder Jackson Merrill appeared to injure his back on a leaping attempt to catch the ball, and he departed before the fifth inning began.

Ohtani’s final inning, the fifth, built to one of the two big moments for the Padres’ offense. But it ended on a result that has headlined their offensive ineffectiveness as much as anything — a hard groundball by Fernando Tatis Jr.

Tom Krasovic: Padres get the full Shohei Ohtani experience in loss to Dodgers

The bottom of the fifth began with a flared single to center by Bryce Johnson, who replaced Merrill. Nick Castellanos followed with a single that moved Johnson to third before Ramón Laureano grounded a ball back to Ohtani that the pitcher threw to second to force out Castellanos.

Freddy Fermin drew a walk to load the bases, bringing up Tatis with one out.

With the Padres’ portion of the crowd having been stirred for the first time, Tatis hit the first pitch he saw on the ground to shortstop Mookie Betts, who began an inning-ending double play.

That came on the 88th pitch by Ohtani, who allowed three hits and struck out four while lowering his ERA to 0.73 — a half-point better than any other MLB pitcher who has thrown even 20 innings this season.

The smallest of victories for the Padres was that Ohtani had in all seven of his previous starts this season gone at least six innings while allowing two or fewer runs.

He did run his scoreless streak to 16 innings, and the Dodgers’ bullpen ran its scoreless streak to 29 innings as it closed out the series victory.

They did so despite the Padres again getting runners at the corners with one out against Kyle Hurt in the eighth inning.

But after Ramón Laureano’s line drive single and a dribbled single by Tatis, Miguel Andujar grounded into a double play.

An 0-for-4 night ended Andujar’s hitting streak at eight games. The five hits the Padres got dropped their MLB-worst batting average to .221.

The Dodgers, who entered the game with the major league’s highest OPS, began each of the first three innings with extra-base hits and scored in two of those.

Vásquez, whose 4⅓ innings comprised his second-shortest outing in 10 starts, retired the Dodgers in order just once and departed after walking two batters and getting an out in the fifth inning.

One of the runners he left scored on a single allowed by Wandy Peralta, and Teoscar Hernandez homered against Ron Marinaccio in the ninth inning.