San Francisco, CA (SportsNetwork.com) - Tim Hudson tossed 6 1/3 scoreless innings and the San Francisco Giants beat the Los Angeles Dodgers 2-0 in the opener of a three-game series.

Hudson (2-3) gave up five hits while striking out two and walking two for the Giants, who have won four in a row.

"I pitched just enough to keep us in there," Hudson said. "I got away with some tough pitches."

Los Angeles starter Carlos Frias (3-1) took the hard-luck loss after allowing one run on seven hits over six innings.

Each team had a chance to score in the first. The Dodgers put men on the corners with two outs when Scott Van Slyke struck out looking. In the bottom half, the Giants left runners on second and third when Brandon Belt grounded out.

San Francisco grabbed a 1-0 lead in the third when Joe Panik, Angel Pagan and Buster Posey hit three straight two-out singles.

Los Angeles left the bases loaded in the seventh. Alex Guerrero hit a one-out single, chasing Hudson from the game. With Jean Machi on the mound, pinch- hitter Justin Turner reached when the Giants failed to turn a double play. On the play, Turner advanced to second on Joe Panik's throwing error. Javier Lopez walked Joc Pederson and Jimmy Rollins to fill the bags. Sergio Romo entered the game and got Howie Kendrick to ground out.

"Carlos was good tonight," Dodgers manager Don Mattingly said. "He did the job for us. He gave us a chance. We haven't scored a lot of runs lately. Hopefully it's a short little stretch and we can come back tomorrow and put some runs on the board."

The Giants tacked on an insurance run off Chris Hatcher in the eighth. Belt reached first and advanced to second on Enrique Hernandez's fielding error. He moved to third when Hunter Pence grounded out and scored on a wild pitch.

Romo stayed on to pitch the eighth and Santiago Casilla tossed a scoreless ninth for his 10th save of the season.

Game Notes

San Francisco improved to 5-2 against the Dodgers this season ... The Giants had scored 30 runs over their previous three contests ... Los Angeles signed infielder Hector Olivera to a six-year contract on Tuesday ... Hudson improved to 7-6 lifetime against the Dodgers.