San Francisco’s J.D. Davis  celebrates after hitting a game-winning home run in the ninth inning Saturday against the Boston Red Sox. Jeff Chiu/Associated Press

SAN FRANCISCO — J.D. Davis homered on the first pitch from Kenley Jansen in the ninth inning to give the San Francisco Giants a 3-2 victory over the Boston Red Sox on Saturday night.

After the Red Sox tied it in the top of the ninth on Justin Turner’s two-run single against All-Star closer Camilo Dovall that deflected off diving second baseman Casey Schmitt’s glove and rolled into center field, Davis came through for San Francisco with his second game-ending hit of the season.

Giants slugger Wilmer Flores continued his hot streak with three hits and an RBI and made a terrific defensive play at first base.

Marco Luciano added two hits as the Giants remained unbeaten when using Ryan Walker as an opener this season. San Francisco won for third time in 10 games.

Doval (3-3) got the win after blowing a save.

There were few Red Sox highlights on a day when pitcher James Paxton suffered through an uneven outing. Paxton allowed one run and eight hits in five innings. It marked the sixth time in 13 starts that Paxton has failed to last longer than five innings.

Advertisement

Flores, who has reached base safely in his last 12 games, had an RBI double off Paxton in the first inning, then added singles in the third and fifth. He also made the defensive play of the game when he snagged Adam Duvall’s high pop-up while falling backward onto the grass in foul territory in the fifth. Flores grounded out and struck out looking in his other two at-bats.

Flores is batting 28 for 71 with 12 extra-base hits (.394) since July 2, raising his average to .297.

Sean Manaea allowed two hits over 4 2/3 innings in relief of Walker. Manaea had five strikeouts and didn’t allow a runner past first base.

Walker worked through the order once, allowing one hit with three strikeouts in 2 2/3 innings. The Giants improved to 7-0 in games using Walker as the opener. San Francisco is 13-4 overall this season when using openers.

The Red Sox missed their best chance to score in the first inning when Turner doubled and advanced to third on a fielder’s choice. Walker got Triston Casas to strike out swinging to end the inning.

San Francisco doubled its lead to 2-0 in the sixth. Luciano singled leading off and Casey Schmitt was hit by a pitch. After both runners were sacrificed over, Austin Slater hit a sharp grounder to second, and Luciano scored on a headfirst slide into home without a throw.

TRAINER’S ROOM

Red Sox: To make room, for new reliever Maurico Llovera, left-hander Joe Jacques was optioned to Triple-A Worcester.

Giants: Shortstop Brandon Crawford was activated from the disabled list but did not start after missing 11 games because of left knee inflammation. … Infielder Thairo Estrada (left hand fracture) is making progress, according to Manager Gabe Kapler. … Utilityman Brett Wisely was optioned to Triple-A Sacramento.