By WILL GRAVES AP Sports Writer

PITTSBURGH (AP) — Pedro Pages doubled home pinch runner Michael Siani and then scored on Alec Burleson’s RBI single as the the St. Louis Cardinals edged the Pittsburgh Pirates 3-2 in 10 innings on Thursday.

St. Louis took two of three from its NL Central Division rivals by winning a series finale for the 12th time in its last 13 chances — one of the reasons the Cardinals are 30-17 since May 12, the third-best record in the majors over that span.

“It’s important,” St. Louis manager Oliver Marmol said. “You feel good heading to the next city, mood wise, just all of it. It carries you through.”

Burleson and Dylan Carlson had two hits apiece for St. Louis. John King (3-1) retired Andrew McCutchen with the tying run on second in the 10th to pick up the victory for the Cardinals, who improved to 16-12 in one-run games this season after going 17-26 in tight contests a year ago.

St. Louis starter Andre Pallante worked a career-best seven innings to give the Cardinals’ overextended bullpen a little bit of a breather. Pallante struck out five against one walk, his only wobble coming when Bryan Reynolds led off the fourth with his 14th homer of the season for Pittsburgh.

“I mean, definitely the confidence has been snowballing in the last couple of outings and just having confidence with my pitches and the way that they’re going,” Pallante said.

Reynolds’ homer was the highlight for the Pirates, who managed just seven hits total. Nick Gonzales provided an unusual sacrifice fly in the bottom of the 10th, hitting a drive to the notch in left-center field that St. Louis left fielder Brendan Donovan tracked down. Donovan, however, hesitated while getting the ball in, allowing pinch runner Michael A. Taylor to score from second.

Jared Triolo and Joey Bart followed later in the inning with consecutive two-out singles but McCutchen grounded into a fielder’s choice to end it.

Dennis Santana (2-1) took the loss when Pages hit a liner to left-center that a diving Taylor couldn’t grab, scoring Siani. Burleson followed with a bloop that let Pages chug home from second.

The Cardinals went 0 for 8 with runners in scoring position and left six men on base through the first nine innings, including two in the ninth when pinch-hitter Matt Carpenter struck out looking with the go-ahead run just 90 feet away.

They survived thanks in part to gritty work by King and Andrew Kittredge, who struck out Reynolds at the end of an 11-pitch at bat in the eighth with the go-ahead run on second.

Martin Perez worked in and out of trouble over 7 1/3 innings for the Pirates in his second start back from a month-long stay on the injured list with a left groin problem. Perez allowed one run on six hits, with a walk and two strikeout and showed a rare burst of emotion when he pumped his left first after fanning Paul Goldschmidt to end the sixth.

“I was able to move the ball where I wanted and make some pitches,” Perez said. “It was a great game. We played good. That’s what happens, they were just lucky at the end, but that’s part of the game.”

TRAINER’S ROOM

Pirates: Placed rookie pitcher Jared Jones on the 15-day injured list on Thursday with a right lat strain. Jones, who will out until after the All-Star break, complained of discomfort in his right side while working five innings against the Cardinals on Wednesday. … C Henry Davis (concussion) will begin a rehab assignment with Triple-A Indianapolis on Thursday night.

UP NEXT

Cardinals: Head to Washington for a four-game set with the Nationals starting Friday. Sonny Gray (9-5, 2.98 ERA) faces Washington’s Patrick Corbin (1-8, 5.49).

Pirates: Welcome the New York Mets for a four-game wraparound series starting Friday. Star rookie Paul Skenes (4-0, 2.06) starts the opener against New York’s Luis Severino (5-2, 3.42)