Cardinals starting pitcher Lance Lynn watches the action in the dugout after giving up three runs to the San Francisco Giants in the first inning. UPI/Bill Greenblatt

San Francisco catcher Buster Posey hit a three-run homer off Cardinals starter Lance Lynn in the first inning as the club saw their seven game home winning streak come to an end with a 4-2 loss to the Giants on Tuesday night.

Allen Craig hit two solo homers off Giants starter Barry Zito, his 16th and 17th of the season. Zito went 6.2 innings in picking up the win. Lynn allowed eight hits over six innings, while walking three and striking out four. Lynn falls to 13-5 on the year.

Milwaukee beat Cincinnati, so the Cardinals did not lose ground in the Central Division race and remain six back. Atlanta and Pittsburgh also lost.