PITTSBURGH (AP) — Jameson Taillon let a lead get away in his last start.

This time, he had the answer when he got in trouble.

Taillon struck out a career-high 10 to lead the Pittsburgh Pirates to a 6-3 victory over the Milwaukee Brewers on Thursday night.

"You don't want to live and die by the strikeout, but whenever you need it, you definitely want to be able to get it," Taillon said. "I felt like I got some pretty big ones in big spots. Those are the ones where it was cool."

Taillon (6-7) surrendered one run on four hits with two walks in six innings. The right-hander struck out the side twice, once in the third inning and again in the fifth, when he got out of a jam after allowing a leadoff walk to Tyler Saladino followed by a single from Erik Kratz.

In his last start, Taillon allowed a 2-0 lead to slip away to the Philadelphia Phillies on Saturday. Right-handed reliever Edgar Santana replaced him with the score tied 2-2, and allowed the go-ahead run in what would be a 3-2 loss.

Jordy Mercer made sure a lack of run support wouldn't spoil another solid outing from Taillon on Thursday. He tied a career high with four RBIs and went 3 for 4 with three singles, one of which knocked in two runs.

Pittsburgh's 6-7-8 hitters of Josh Bell, Josh Harrison and Mercer finished a combined 5 for 7 with five RBIs and five walks.

"It seemed like we got some rallies going with two outs there," Mercer said.

"It's good to have those guys getting it going."

The Pirates have won four of their past five games to pull to 10 1/2 games back of the first-place Brewers, who have lost four of six, in the NL Central.

Felipe Vazquez earned his 21st save by getting the final two outs. Michael Feliz allowed Eric Thames to cut the Pirates' lead to 6-2 with a single up the middle before Christian Yelich made it 6-3 with a single off Vazquez and Jesus Aguilar grounded into a double play to end it.

"I think the small solace is that you get Vazquez in the game and make him throw," Brewers manager Craig Counsell said. "Hopefully, if that can impact the rest of the series, maybe that's a good thing."

Wade Miley (1-1) gave up two runs on four hits in five innings with five strikeouts and five walks for Milwaukee.

"I'm just excited to be back out there," Miley said. "I would've liked to go a little deeper in the game, but it is what it is. You have to start somewhere."

Miley allowed two two-out RBI singles to Mercer that put Pittsburgh ahead 2-1. Mercer's first opened the scoring in the second when he drove a ball down the left-field line, scoring David Freese. Aguilar tied it at 1 with a home run, his 24th, to left-center field in the fourth.

Mercer gave the Pirates a 2-1 lead when he lined a single off Saladino's glove and into left field to drive in Bell in the fourth. He made it 4-1 in the sixth with a two-run single, driving in Bell and Harrison, and scored on a two-out single to right from Starling Marte, pushing it to 5-1.

Harrison, who was 2 for 2 with two walks, made it 6-1 with a double to left in the seventh.

"(Bell, Harrison and Mercer have) been going through some droughts together," Pirates manager Clint Hurdle said. "Tonight, they just bunched at-bats. They connected the dots for us. ... A big shot in the arm for us on offense."

ALL-STAR SUB

Brewers: RHP Jeremy Jeffress will replace Washington Nationals LHP Sean Doolittle on the National League All-Star team, Counsell said. Jeffress is 6-1 with a 0.99 ERA in 44 games this season.

ROSTER MOVES

Brewers: INF Nate Orf and RHP Jorge Lopez were optioned to Triple-A Colorado Springs. RHP Freddy Peralta was optioned to Class-A Wisconsin. INF Eric Sogard was released.

TRAINER'S ROOM

Pirates: Hurdle said Pittsburgh is deciding whether to option OF Austin Meadows to Triple-A Indianapolis. Meadows did not start a fourth straight game Thursday since he went 1 for 4 against the Philadelphia Phillies on Sunday.

UP NEXT

Brewers: RHP Junior Guerra (6-5, 2.79) could win a fourth straight start when he faces the Pirates on Thursday. In his past three starts, Guerra has surrendered a combined five runs, including one in his past two starts.

Pirates: RHP Nick Kingham (3-4, 4.26) allowed one run on four hits with five strikeouts, and had two RBIs, in a 4-1 win over the Phillies on Sunday.