Johnny Cueto pitches 5-hitter, Giants beat Cardinals 6-2

San Francisco Giants pitcher Johnny Cueto, right, celebrates the team's 6-2 win over the St. Louis Cardinals with Buster Posey (28) at the end of a baseball game Thursday, Sept. 15, 2016, in San Francisco. (AP Photo/Ben Margot)
Ben Margot/AP

SAN FRANCISCO (AP) Fist-pumping Johnny Cueto pitched a five-hitter and retired his final 17 batters, and the San Francisco Giants gained ground in the playoff race with a 6-2 victory over the St. Louis Cardinals on Thursday night.

The Cardinals' loss clinched the NL Central title for the Chicago Cubs.

Hunter Pence hit a two-run homer, Cueto (16-5) had a go-ahead sacrifice fly in the fourth and Angel Pagan followed with an RBI single. Denard Span added a two-run single in the seventh for San Francisco.

The Giants gained a game on the division-leading Los Angeles Dodgers, who are ahead by four after losing at Arizona.

San Francisco also moved a game ahead of the Mets in the chase for the top NL wild card and two games up on the Cardinals.

St. Louis opened a 10-game road trip, its last of 2016.