Updated

Allen Craig homered for the second time in three days and All-Star Yadier Molina also connected as the Cardinals beat the Pirates 5-4 on Sunday.

St. Louis avoided getting swept in a three-game series at home by Pittsburgh for the first time since 1991.

Jason Motte got the last four outs for his 17th save in 21 chances to end the Pirates' four-game winning streak. Motte was the last in a flurry of moves by rookie manager Mike Matheny that left three players seeing time at two positions.

Michael McKenry's three-run homer capped a four-run fourth that put the Pirates ahead for the first time and also gave them a homer in nine straight games. They've totaled 15 homers in their longest streak since another nine-gamer in June 2008.