Carlos Beltran hit a go-ahead two-run single in the fifth and Shelby Miller won in his second career start, with a 6-3 win victory for the Cardinals over San Francisco.

Beltran also hit an RBI single in the first, Pete Kozma had three hits, Matt Holliday singled in a run and Matt Carpenter added an RBI single in the ninth.

Miller, the Cardinals’ top pitching prospect, allowed four hits and two runs in 5.1 innings. He struck out four and walked four in the first road start of his career. Mitchell Boggs, filling in for injured closer Jason Motte, finished for his first save.