David Bednar had pitched the previous two games, so the Pittsburgh Pirates wanted to be careful before deciding whether the two-time All-Star closer was available for the ninth inning Tuesday night.

Pirates manager Derek Shelton believed Bednar reported to PNC Park with the mindset that he wanted to pitch, so it was sealed when bullpen coach Justin Meccage reported that he looked strong in pregame catch play.

“Ultimately, making that decision with the staff and everybody like that, I gave them the green light and told them I felt good,” Bednar said, “and went out and did it.”

Bednar pitched a perfect ninth inning to clinch a 2-1 win over the Milwaukee Brewers and earn his fourth save. It was his second save in as many days, an indication that the right-hander has put his rocky start to the season in the rear-view mirror and is starting to show signs of returning to his dominant ways. After giving up a single to Jackson Chourio, Bednar got Oliver Dunn swinging at a splitter to end Monday’s 4-2 win that snapped a six-game losing streak.

“I think just making the little adjustments as the year went on and now, getting to a spot where I’m comfortable and I’m in a groove and feeling good,” Bednar said. “Whenever you get in that groove, you want to keep getting out there. So, it was nice to get out there the past couple days.”

After missing much of spring training with a right lat issue, the Pirates practiced caution with Bednar. But he was booed off the field at PNC Park after blowing a 3-1 lead in the ninth inning of a 5-3 loss to the Detroit Tigers on April 9.

It was a stunning scene for a Mars alum who has been a fan favorite, especially after tying for the National League lead with 39 saves last season and leading the majors with a 92.8% save percentage (39 of 42).

After bouncing back with a scoreless ninth for a save at the Philadelphia Phillies on April 12, Bednar didn’t pitch the next four games. So the Pirates used him in the eighth inning against the New York Mets on April 17, only for his ERA to balloon to 13.50 when he allowed three runs on two hits and a walk in two-thirds of an inning in the 9-1 loss.

“I think it’s just work. I know last year we didn’t go three days in a row until June with him, but it was just the fact that he was really efficient two days ago, and then (Monday) he threw 20 (pitches),” said Shelton, who noticed that Bednar threw “the best curveballs we’ve seen” the past two games. “So now we’re seeing him get back on track. He’s been able to spin it. He even spun one to (Rhys) Hoskins that I think was a ball, but it was probably the best one he’s thrown in a while.”

Bednar mixed his curveball with a four-seam fastball that touched 97.4 mph and his signature splitter against the Brewers, throwing nine of his 11 pitches for strikes in striking out Willy Adames and getting groundouts from Hoskins and Blake Perkins to end the game.

“Absolutely,” Bednar said. “I think with all of them, just being able to be in the strike zone, commanding them in the strike zone. That’s the big difference-maker for me. Whenever I can compete with all three in the zone, that’s when I’m able to have success.”

Pirates catcher Joey Bart was impressed with how Bednar, like starter Bailey Falter, went on the attack by mixing his pitches and landing his curveballs in the strike zone.

“He’s got devastating stuff,” Bart said. “You don’t have to play around with too many people. It’s really just stay on the attack and throw strikes. He is who he is for a reason.”

Kevin Gorman is a TribLive reporter covering the Pirates. A Baldwin native and Penn State graduate, he joined the Trib in 1999 and has covered high school sports, Pitt football and basketball and was a sports columnist for 10 years. He can be reached at kgorman@triblive.com.