SAN FRANCISCO >> Justin Verlander came into the season with 262 wins, the most in major league baseball.

No. 263 is proving to be elusive, as Verlander struggled with his command through four innings, received a no decision and departed trailing by a run.

That didn’t stop the Giants from completing a three-game sweep of the Athletics Sunday before a crowd of 40,051 at Oracle Park courtesy of Heliot Ramos.

Ramos hit the first pitch he saw for a solo home run in the first inning then grounded an RBI single to left in the eighth to give the Giants a 3-2 win over the A’s.

Ramos’ home run, off A’s starter Jeffrey Springs, was his eighth of the season. Two pinch-hitters figured in a two-run rally in the eighth off reliever Tyler Ferguson, with LaMonte Wade Jr. hitting a triple to right center and scoring on Patrick Bailey’s ground single to center.

After a sacrifice bunt by Christian Koss, Ramos’ single put the Giants ahead as they improved to 28-19. The Athletics fell to 22-25.

After Ramos’ initial blast, Springs went on to retire the next 20 hitters before Matt Chapman singled with two out in the seventh, with manager Mark Kotsay going to right-hander Justin Sterner in the bullpen. Sterner walked Willy Adames before retiring pinch hitter Mike Yastrzemski on a fly to center to retain a 2-1 lead.

In 7 2/3 innings, Springs threw 84 pitches, 54 of them strikes, with no walks and five strikeouts.

After Verlander appeared to right himself in a 13-pitch, 1-2-3 third inning, he ran into trouble after getting the first two outs in the fourth.

Luis Urias doubled over the head of Ramos in left, with Verlander walking the No. 8 and 9 hitters, Max Schuemann and Jhonny Pareda. Lawrence Butler followed with a first-pitch two-run single.

By that point, Verlander was up to 84 pitches, only 31 of them strikes, with five walks. When the fourth opened, Spencer Bivins was on the mound and Verlander was still looking for his first win as a Giant in 10 starts.