ST. LOUIS (AP) — Albert Pujols hit his 684th homer and Tommy Edman drove in the tiebreaking run with a sacrifice fly in the eighth inning to help the scuffling St. Louis Cardinals beat the Philadelphia Phillies 4-3.

St. Louis had lost two straight and six of seven.

Kyle Schwarber hit his NL-leading 28th homer for the Phillies, who had won three in a row.

Pujols, who singled to start the go-ahead rally in the eighth, has 1,377 extra-base hits to tie Stan Musial for third place on the career list. The slugger’s fifth homer of the season was a solo shot in the sixth that brought the Cardinals within 3-2.

They tied it in the seventh on Nolan Gorman’s groundout.