Yadier Molina's 100th career home run in the bottom of the eighth inning snapped a tie and the St. Louis Cardinals beat the San Francisco Giants 4-3 on Wednesday night.

Molina added an RBI single in the first and rookie Stephen Piscotty homered in the third for St. Louis, which took two of three from the NL West-contending Giants. The Cardinals are 77-43 overall and 46-19 at home, both tops in the majors.

Kevin Siegrist (5-0) allowed a walk in the eighth and Trevor Rosenthal earned his 38th save in 40 chances, striking out pinch-hitting pitcher Madison Bumgarner to end it. Siegrist won both of the games in the series and the Cardinals wrapped up a 6-3 homestand with three 2-1 series wins and have won six consecutive series overall.

More from FoxSports

Molina led off the eighth by lining an 0-1 breaking ball from Hunter Strickland (2-3) into the left field stands for his fourth homer of the year.

Brandon Crawford and Kelby Tomlinson had two hits and an RBI apiece for the Giants, who missed a chance to pull one game behind the Dodgers.

Piscotty's second career homer put the Cardinals ahead 2-0 in the third, two innings after center fielder Juan Perez scaled the wall to rob him of a long ball in one of the top defensive plays of the season at Busch Stadium.

The Giants' Matt Cain ended a run of four poor starts, allowing two runs in six innings, and contributed a bases-loaded sacrifice fly. The Cardinals' Jaime Garcia gave up three runs in 6 1-3 innings.

The Cardinals manufactured the tying run in the seventh on two hits, one of them an unintentional swinging bunt by Brandon Moss, and a fielder's choice RBI. Rookie Tommy Pham's headfirst slide dislodged the ball from catcher Andrew Susac on Matt Carpenter's grounder to second.

BIG STICKS

Crawford has nine extra-base hits during a career-high 13-game hitting streak. ... Piscotty leads St. Louis with a .333 batting average since making his major league debut July 21. ... Molina broke a tie with the Giants' Buster Posey for ninth among active catchers in homers.

TRAINER'S ROOM

Giants: OF Angel Pagan (knee) is expected to be activated off the DL on time Aug. 25.

Cardinals: Jason Heyward (hamstring) missed his second straight start but grounded out as a pinch-hitter to end the eighth. 1B Matt Adams (quad) is running near full speed and leaves for Florida to begin baseball activities Friday.

UP NEXT

Giants: Jake Peavy (3-5, 4.18) is 5-2 with a 2.52 ERA in eight career starts against Pittsburgh.

Cardinals: St. Louis has a day off before beginning a 10-game trip to San Diego, Arizona and San Francisco. John Lackey (10-7, 2.87) will be seeking his 13th consecutive quality start Friday against the Padres.