Tyler Beede allowed one run over six innings to earn his first big-league victory and the San Francisco Giants defeated the first-place Los Angeles Dodgers 3-2 Monday night in the opener of a four-game set between the NL West rivals.

The 26-year-old right-hander scattered three hits, struck out seven and walked five on 97 pitches in the strongest outing of his young career. He tied career highs in innings and strikeouts. Beede came in 0-3 with an 8.10 ERA in eight career appearances, including six starts.

Beede (1-2) has been recalled from the minors three times this season, including for a stint in the bullpen. He's been especially effective with his curveball and changeup, with opponents going 2 for 27 against those pitches in his previous four starts.

San Francisco Giants' Stephen Vogt, below, scores on a double by Brandon Crawford as Los Angeles Dodgers catcher Austin Barnes waits for the throw during the second inning of a baseball game Monday, June 17, 2019, in Los Angeles. (AP PhotoMark J. Terrill)

San Francisco Giants' Stephen Vogt, below, scores on a double by Brandon Crawford as Los Angeles Dodgers catcher Austin Barnes waits for the throw during the second inning of a baseball game Monday, June 17, 2019, in Los Angeles. (AP PhotoMark J. Terrill)

Closer Will Smith retired the side, including two strikeouts, in the ninth and improved to 19 for 19 in save chances, with his consecutive saves to start the season the second-most by a Giants pitcher since 1969.

Giants first baseman Pablo Sandoval left the game in the fifth after baserunner Max Muncy stepped on his right hand. Sandoval's pinky finger appeared to be cut and bloodied.

The Dodgers closed to 3-2 in the eighth when Chris Taylor grounded into a fielder's choice to third, scoring Cody Bellinger, who doubled into the left fielder corner.

Los Angeles Dodgers starting pitcher Kenta Maeda, of Japan, throws to the plate during the first inning of a baseball game against the San Francisco Giants, Monday, June 17, 2019, in Los Angeles. (AP PhotoMark J. Terrill)

Los Angeles Dodgers starting pitcher Kenta Maeda, of Japan, throws to the plate during the first inning of a baseball game against the San Francisco Giants, Monday, June 17, 2019, in Los Angeles. (AP PhotoMark J. Terrill)

The Giants led 2-0 in the second on Brandon Crawford's RBI double to deep right field after Stephen Vogt drew a leadoff walk and Evan Longoria singled.

The Dodgers answered in the bottom of the inning, closing to 2-1 on Muncy's leadoff homer, his 17th.

Kenta Maeda (7-4) gave up two runs and three hits in five innings. He struck out four and walked two.

Los Angeles Dodgers' Kenta Maeda, of Japan, hits a single during the third inning of a baseball game against the San Francisco Giants, Monday, June 17, 2019, in Los Angeles. (AP PhotoMark J. Terrill)

Los Angeles Dodgers' Kenta Maeda, of Japan, hits a single during the third inning of a baseball game against the San Francisco Giants, Monday, June 17, 2019, in Los Angeles. (AP PhotoMark J. Terrill)

The Giants improved to 5-5 against the Dodgers this season, with eight of the 10 games being decided by two runs or less.

TRAINER'S ROOM

Giants: C Buster Posey got the day off as he makes his way back from a hamstring injury.

Dodgers: 3B Justin Turner didn't start, but pinch hit in the ninth.

UP NEXT

Giants: RHP Shaun Anderson (2-1, 3.97 ERA) makes his seventh career start.

Dodgers: LHP Clayton Kershaw (6-1, 3.13) took the loss against the Giants on the road June 7. He is 22-11 with a 1.72 ERA in 45 career starts against them.

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP_Sports