PITTSBURGH — With the bases loaded with no outs in a one-run game and Pittsburgh All-Star first baseman Josh Bell walking into the batter's box, St. Louis Cardinals pitching coach Mike Maddux paid a visit to rookie Dakota Hudson and offered a reminder.

Relax, Maddux told the 24-year-old. You're a groundball pitcher. Get a groundball and get on with it.

"That was pretty much how it was," Hudson said. "I just went after him and tried to attack him the best I could."

Hudson was OK with giving up one run but not two. He needn't have worried. The way he's dealing for the streaking Cardinals, it might be time to raise the bar.

Hudson struck out Bell on three pitches, then got Colin Moran to hit into an inning-ending double play to preserve the lead and help St. Louis hold on for a 4-3 victory on Tuesday night.

"That was the key, the bases-loaded jam with nobody out," St. Louis manager Mike Shildt said. "It was a huge part of the game. It kind of reiterates the point of not making it bigger than it is, just bearing down and making pitches, knowing he's two pitches away with what he has. He did a fantastic job."

It was an exclamation point on an outing that began ominously for Hudson (10-4). He gave up three runs before recording an out — all on Starling Marte's 17th home run — but settled down quickly. He didn't allow a run the rest of the way, working 6 1/3 innings, giving up six hits and three walks to improve to 8-1 in his last 12 starts. Giovanny Gallegos and Andrew Miller retired the last eight Pittsburgh batters, with Miller throwing a perfect ninth for his third save.

Paul Goldschmidt, who hit a go-ahead grand slam in the 10th inning on Monday, delivered a two-run drive to the left-field seats in the third inning off Chris Archer (3-7). José Martínez put St. Louis in front with a solo shot leading off the fifth , and the pitching did the rest as St. Louis moved to 9-3 since the All-Star break to close ground on the first-place Chicago Cubs in the quickly widening NL Central.

"I think we're going to be good," Martinez said. "Especially winning these games, these close games, I think that gets us pumped up."

PITTSBURGH PLUNGE

The Cardinals and Pirates were separated by a half-game at the break. The gap has expanded considerably over the last two weeks. Pittsburgh fell to 2-9 since over its last 11 games, with four of the losses to St. Louis. Pittsburgh is averaging just three runs during its slide.

"I think obviously when you're not scoring runs it looks like you're pressing," Moran said. "Just kind of in one of those ruts right now. I think we can get out of it any day."

Time is running out.

Archer couldn't take advantage of the early cushion and has now given up 24 home runs in 96 2/3 innings. Acquired in a trade with Tampa Bay last summer that sent future All-Star outfielder Austin Meadows and pitcher Tyler Glasnow to the Rays, Archer is 6-10 with a 5.01 ERA with the Pirates. Archer said he threw the ball right where he wanted on the Goldschmidt homer, but Goldschmidt turned on it anyway.

"Where we're at in the season, I'm not trying to give up anything," Archer said. "I'm not trying to tip my cap. I'm trying to get people out. And just unfortunate that those home runs were hit."

Goldschmidt's drive inside the foul pole in left with one on in the third gave him six home runs this month and 20 for the fifth straight season and seventh time in his nine-year big league career. Martínez, who preserved a 6-5, 10-inning win Monday by throwing out Kevin Newman at home, put the Cardinals in front an inning later. Hudson didn't let the rally go to waste.

KELA EXPECTED BACK

Pirates manager Clint Hurdle expects the team to activate reliever Keone Kela when he returns from a two-game suspension on Wednesday. The Pirates suspended Kela, who recently completed a stint on the 60-day IL, on Monday for an unspecified violation of his contract.

TRAINER'S ROOM

Cardinals: Activated right-handed reliever Mike Mayers (strained right side) from the 60-day IL and designated reliever Chasen Shreve, credited with Monday's win, for assignment. ... 3B Matt Carpenter (bruised right foot) was 0 for 2 with a walk for Triple-A Memphis and is scheduled to return to the Cardinals on Friday when he's eligible to come off the IL.

Pirates: RF Gregory Polanco (left shoulder inflammation) met with orthopedic surgeon Dr. David Altchek in New York to have the shoulder re-evaluated. The team shut down Polanco in the middle of a rehab assignment at Triple-A Indianapolis after Polanco, on the IL since June 22, complained of lingering soreness.

UP NEXT

Cardinals: Adam Wainwright (6-7, 4.50 ERA) is 13- against the Pirates, the second-most victories against Pittsburgh among active pitchers.

Pirates: Jordan Lyles (5-6, 4.91) is winless since May 23 heading into his 17th start of the season. Lyles is coming off his best performance since mid-May, allowing one run on seven hits in 5 2/3 innings against Philadelphia last Friday.

___

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP_Sports