SAN DIEGO (CBS/AP) — Buster Posey hit a two-run home run and Tim Lincecum earned his first victory of the season for the San Francisco Giants, who had only three hits Sunday in beating San Diego 4-3 Sunday to snap a three-game losing streak.

Padres pitchers retired 23 of the final 24 batters and the Giants didn’t get a hit after the second inning.

READ MORE: UPDATE: Atmospheric River Crashes Onshore; Flood Warning Issued For Napa, Sonoma Counties

The Giants had scored only one run in each of their previous three games.

READ MORE: UPDATE: Streets Flood in San Rafael, Mill Valley as Wild Storm Lashes Bay Area

Lincecum (1-1) was chased by Nick Hundley’s first homer of the season, on the first pitch of the seventh inning that pulled the Padres to 4-3. Lincecum allowed three runs and seven hits, struck out seven and walked three.

Sergio Romo pitched the ninth for his fifth save in as many chances.

MORE NEWS: Stephen Curry Reaches 5,000 Assists, Warriors Beat Kings 119-107

© Copyright 2014 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.