Kirby Lee-USA TODAY Sports

Sean Manaea did not allow a run over a season-high seven innings and the visiting San Francisco Giants picked up a much-needed victory on Friday, beating the Los Angeles Dodgers 5-1.

Manaea (7-6) gave up three hits, all singles, and no walks while striking out two. He did not allow a runner to reach second base en rout to his first career win over the Dodgers in 10 appearances (seven starts). The left-hander entered 0-5 against Los Angeles with a 9.00 ERA.

Mike Yastrzemski, Thairo Estrada and Tyler Fitzgerald hit home runs as San Francisco (77-77) remained three games out of the final wild-card spot in the National League. The Giants are 2-6 on their final road trip of the regular season, which has two more games remaining at Los Angeles.

Freddie Freeman had two hits and an RBI for the Dodgers to reach 200 hits for the first time in his career. Freeman became the first first baseman in major league history to reach 200 hits, 20 home runs and 20 stolen bases in the same season.

Los Angeles (94-59), which already wrapped up the National League West title, saw its magic number for wrapping up a top-two seed in NL playoffs remain at two. The top two seeds from each league earn a bye into the division series.

The Giants called on Joc Pederson for an early-pinch hit assignment, and the former Dodger doubled in the fourth inning against right-hander Gavin Stone. Three batters later, Yastrzemski delivered a two-out, two-run home run for a 2-0 lead, his 15th of the season.

Estrada hit a solo home run in the sixth inning off Stone for a 3-0 lead, his 13th.

The Dodgers came to life in the eighth, loading the bases against right-hander Tyler Rogers and getting an RBI single from Freeman to pull within 3-1. Right-hander Camilo Duval entered to get Will Smith on a groundout to end the inning, and he pitched a 1-2-3 ninth for his 38th save.

In his second career game, Fitzgerald hit his first home run in the ninth.

After Dodgers left-hander Caleb Ferguson opened with a scoreless inning, Stone (1-1) gave up three runs on three hits in 4 1/3 innings with two walks and five strikeouts.

More must-reads:

TODAY'S BEST
Rangers center making long-awaited return in Game 3 vs. Hurricanes
Suns talks with head-coaching target 'expected to move quickly'
Knicks get even more bad injury news ahead of Game 3
Frank Vogel fell victim to a Suns ownership group eager to win
2008 Celtics champion sentenced to prison despite emotional plea
Skip Bayless makes huge Tom Brady prediction after Netflix roast
14-year-old phenom signs unprecedented MLS deal that includes future Man City transfer
Pacers coach claims officials are biased against 'small market' teams
Hall of Famer makes bold prediction about Russell Wilson, Steelers
49ers Hall of Fame CB Jimmy Johnson dies
Rams make surprising move with former team captain
NBA announces discipline for Bucks' Patrick Beverley
Hall of Fame RB defends Najee Harris after Steelers decline fifth-year option
Pacers file shocking number of questionable calls after Game 2 loss vs. Knicks
Former NBA star says Anthony Edwards becomes face of the NBA if Wolves knock off Nuggets
Hornets hire top Celtics assistant as next head coach
Maple Leafs fire HC Sheldon Keefe after another early playoff exit
Super Bowl champion discusses why Russell Wilson failed with Broncos
Colts LB Zaire Franklin calls out Texans, C.J. Stroud
Angels to acquire longtime Mets infielder from Braves