Updated

MIAMI (AP) — Matt Cain pitched into the eighth inning and the San Francisco Giants completed a three-game sweep by beating the Florida Marlins 6-3 Thursday night.

Cain (2-1) held Florida without a hit until the sixth. He gave up four hits and two runs in seven-plus innings, and four relievers completed a five-hitter. Brian Wilson came on to strike out pinch-hitter Wes Helms with one on for his sixth save in seven chances.

Giants starters combined to allow six runs in 21 innings during the series.

Nate Schierholtz hit his first homer of the year for San Francisco. Mark DeRosa had two run-scoring hits, while Aaron Rowand contributed a triple, a two-run single and a lunging catch in center field. Rowand is 7 for 16 with seven RBIs in four games since coming off the disabled list.

The Giants, who took a half-game lead over San Diego in the NL West, have won nine of their past 12 games. But they lost shortstop Edgar Renteria when he aggravated a groin strain and left in the third inning.

Florida's Ricky Nolasco (2-2) allowed five hits — four for extra bases — and three runs in six innings.

Manager Fredi Gonzalez shook up the top of the lineup for the slumping Marlins, benching Cameron Maybin and moving Chris Coghlan back into the leadoff spot, but the changes produced little offense. Florida went 3-6 on its homestand and fell two games below .500 for the first time this season.

Jorge Cantu went 0 for 4 and is hitless in his past 17 at-bats. Coghlan singled with two outs in the sixth for the Marlins' first hit, but he remained without an extra-base hit in 93 at-bats this season. The Marlins, last in the majors in fielding, also committed two errors.

Florida trailed 6-0 before scoring in the seventh when Hanley Ramirez doubled and Dan Uggla singled him home. The Marlins loaded the bases with one out in the eighth but scored only once — on Ramirez's sacrifice fly.

In the second inning the Giants scored once but had two runners tagged out at the plate. Bengie Molina led off with a double, then got hung up between second and third on a comebacker to the pitcher. Nolasco made a wild throw to third, but third baseman Cantu retrieved the ball in foul territory and threw out Molina trying to score.

DeRosa doubled home a run. With two outs, Schierholtz singled, but right fielder Brett Carroll threw a strike to the plate on the fly and DeRosa was out attempting to score.

Roward tripled in the third and scored on a sacrifice fly by pinch-hitter Matt Downs, batting for Renteria.

Schierholtz homered in the fifth for a 3-0 lead. Aubrey Huff doubled and scored on DeRosa's single in the seventh, and Rowand's single made it 6-0.

NOTES: Rain fell briefly early in the game. ... Maybin popped out as a pinch hitter, ending his streak of striking out in 16 consecutive games. ... The Giants' Pablo Sandoval is batting .222 (6 for 27) with runners in scoring position.