SAN FRANCISCO, CA — Wilmer Flores hit a grand slam in the first inning and matched his career high with six RBIs as the San Francisco Giants snapped out of their offensive funk and beat the St. Louis Cardinals 13-7 to end a five-game losing streak.

On a day the Giants honored former catcher Buster Posey in a pregame ceremony, Mauricio Dubón and Darin Ruf also homered.

Cardinals catcher Yadier Molina reached 1,000 career RBIs. Dylan Carlson added a three-run homer, but St. Louis committed three errors and ended its three-game winning streak.