ST. LOUIS -- Colin Moran wanted to hit the ball hard, and in the air, with two on in the ninth inning of a tied game. He didn't, but it turned out well anyway.
"My plan was hit the ball in the air or something hard," Moran said. "It wasn't my plan to hit a ground ball. It worked out. I just wanted to get the runner in at all costs."
Carlos Martinez (2-1) worked one inning of relief and took the loss.
With the score tied 1-1 and one out in the top of the ninth, Starling Marte reached base when he was hit in the back with a pitch by Martinez. Josh Bell beat the shift with a single to the left side of second base, sending Marte to third. Moran hit a sharp grounder to Kolten Wong, who made a diving stop and rose to one knee, but his throw was not in time as Moran slid safely into first and Marte scored for a 2-1 lead.
"I don't know if I've ever slid into first before," Moran said. "It was out of desperation. I'm pretty slow. I hit it pretty decent. He's really good over there."
"We got the win. That's as good as it gets," said Newman, who drove in two runs. "Martinez is really good. We were able to scratch out a win."
The win snapped a four-game losing streak for the Pirates. St. Louis had a three-game winning streak stopped.
"It was a good game for our team," Pittsburgh manager Clint Hurdle said. "We played like we try to play every game."
St. Louis starter Jack Flaherty pitched seven strong innings, but did not get a decision. He allowed one run and three hits, striking out eight and walking three, including one intentional. Flaherty's last victory came on May 14. Since then, Flaherty has three losses and seven no-decision outings.
Dexter Fowler led off the seventh with a double that hit the top of the fence in left. He pulled up well before second, thinking it was a home run. Marte bobbled the ball and Fowler waltzed into third.
"Yeah, it should've at least been a triple," Fowler said. "Definitely not a double."
After Wong walked, Rodriguez relieved and pitched out the jam, getting a fielder's choice, a fly out in foul territory near first base, and a ground out.
"He's been on a roll," Hurdle said of Rodriguez. "He's got a lot of confidence on the mound. It wasn't a prime time to bring in anybody there. It's hard work. He stayed on the attack and kept us in the game."
Not scoring there was huge, St. Louis manager Mike Shildt said.
"That's clearly frustrating. You've got first and third, nobody out and you can't get a ball out of the infield," Shildt said. "Obviously, guys are giving the effort but we've got to execute there. It's a game of execution and the last three innings more or less we didn't execute as well as they did. That was the ballgame."
Flaherty helped himself in the fifth by driving in a run to tie it at 1-all. With one out, a short fly by Harrison Bader fell in and he hustled for a double. After Bader stole third, Flaherty doubled down the third-base line. It was his third double and third RBI this season.
Flaherty then tried to steal third. He was called safe, but Pittsburgh challenged. The call was overturned after a review.
After going hitless the first four innings, the Pirates broke through in the fifth. Corey Dickerson doubled with one out and scored on a single to right field by Newman.
THOU SHALL NOT STEAL
Cardinals catcher Matt Wieters cut down two would-be Pittsburgh stealers. In the fourth, Marte was caught trying to steal second. In the fifth, Newman attempted to steal second as Elias Diaz struck out. He was called safe but the Cardinals challenged. The call was overturned.
The Cardinals announced a crowd of 43,777 to push the club past the 2 million mark in attendance for the season. The other two teams in baseball to eclipse the 2 million mark are the New York Yankees and the Los Angeles Dodgers.
Pirates: RHP Keone Kela (right shoulder inflammation) allowed two runs in one-third inning of relief in his second appearance of his rehab assignment Monday with Triple-A Indianapolis.
Cardinals: INF Matt Carpenter (right foot contusion) went on the 10-day Injured List. "You don't want to be injured ever and to do it after just coming back from the All-Star break, feeling like you're ready to have a strong second half-both individually and for the group," Carpenter said. "It's pretty frustrating." St. Louis recalled rookie infielder Edmundo Sosa, 23, from Triple-A Memphis.
Pirates: RHP Chris Archer (3-6, 5.42) had a season-high 10 strikeouts but didn't get a decision in his last start, a 4-3 loss to the Cubs. He has three career starts and is 0-0 with a 2.20 ERA against St. Louis.
Cardinals: RHP Daniel Ponce de Leon (1-0, 1.99) is making his second career start against the Pirates. In his last outing, he made an emergency start for Adam Wainwright (back spasms) and held Arizona to one run on three hits while pitching 6 2/3 innings. He did not figure in the decision.
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports
Mr. Niche Guy: The best free-agent fits for very specific needs
Pining for a pitcher who can induce double plays? How about a hitter who can make contact in key spots? Here are the best options out there to fill holes this winter.
Source: Catcher Yan Gomes agrees to 2-year, $10M deal with Nationals
Veteran catcher Yan Gomes has agreed to a one-year deal to return to the Nationals, sources told ESPN.
Reports: Baltimore Orioles put Jonathan Villar on outright waivers
The Orioles put Jonathan Villar, who had a career year last season, on waivers after they were unable to find a suitable trade partner for him before Monday's non-tender deadline, according to a MASN Sports report.
Twins SS Jorge Polanco undergoes ankle surgery for chronic injury
Twins shortstop Jorge Polanco is rehabilitating from arthroscopic surgery on his right ankle and is expected to be fully recovered in plenty of time for spring training.
Rays acquire Brian O'Grady from Reds, cut Jesus Aguilar
The Rays have acquired minor leaguer Brian O'Grady from the Reds for a player to be named and cash while also designating first baseman Jesus Aguilar for assignment
Pirates hire Twins bench coach Derek Shelton as manager
Derek Shelton, who spent the past two seasons as the Twins' bench coach, has been hired as the Pirates' manager.