NEW YORK -- Corey Knebel was still sweating and in his full uniform when he conducted his postgame interview.
There were plenty of reasons for Knebel and the Milwaukee Brewers to be sweating after nearly four hours of stressful pitching at Yankee Stadium.
This time, Knebel was not discussing the disappointment of giving up a game-winning homer but the joy of getting through a tough inning.
Knebel put an emphatic end to a successful first half for the Brewers when he struck out the side in the ninth inning to secure a 5-3 victory over the New York Yankees on Sunday.
"I'm still kind of sweating right now, a lot of pitches," Knebel said.
A day after ending a 16-pitch outing by leaving a 1-0 fastball up for Clint Frazier to hit a game-winning three-run homer, Knebel threw 33 more pitches to six hitters and posted his third save of at least four outs.
Little about Knebel's 14th save in 18 opportunities was easy as he entered with Chase Headley on second base. He promptly walked Ji-Man Choi but kept the two-run lead by getting Tyler Wade on a groundout.
The ninth was even more challenging for the All-Star right-hander. He opened the inning by walking Brett Gardner and the Yankees had three chances to at least tie the score.
He quickly got ahead in the count against Aaron Judge and used his fastball to get the first strikeout. Knebel then fell behind Didi Gregorius on a 3-0 count but used another fastball to get the strikeout before ending Milwaukee's ninth win in 11 games by striking out Gary Sanchez looking at another fastball.
"I was hoping I could get Corey back out there today," Milwaukee manager Craig Counsell said. "It's great for Corey. He's been so all on it all year. He had a little hiccup yesterday but got right back out there and him proving it again and he did."
Knebel's escape act against the middle of New York's lineup capped a stellar showing for a bullpen with a 4.09 ERA. After Jimmy Nelson (8-4) allowed a three-run homer to Frazier among three runs and seven hits in five-plus innings, three relievers preceded Knebel and encountered tough situations.
Carlos Torres nearly gave up the lead, but Headley's drive down the right field line was ruled a foul ball after Milwaukee challenged. Torres then struck out Headley and Oliver Drake stranded two in the ninth.
After Drake allowed a single to Gardner, he walked Judge but preserved the lead, aided by right fielder Domingo Santana's leaping catch on Gary Sanchez's liner.
Hughes threw two wild pitches in the eighth, but right before Knebel entered he struck out Frazier.
"Today's game was really about the bullpen," Nelson said. "They came in and did a great job and got out of some jams. Hats off to those guys. That's their game today."
Travis Shaw helped the Brewers get the ball to Knebel by hitting a three-run homer in the first inning off Masahiro Tanaka (7-8) and an RBI single in the fifth off left-handed reliever Chasen Shreve. He tied a season high with his third four-RBI game and hit his fifth first-inning homer.
Stephen Vogt added a second-nning solo homer off Tanaka.
"We wanted to win the series, obviously, and finish out on a good note," Shaw said. "For Corey to bounce back today, that was big. Big first inning for us, getting out ahead and taking the momentum away from them. It was kind of a perfect day all around."
Frazier's three-run homer was among few highlights for the Yankees, who went 1-for-16 with runners in scoring position and struck out 14 times in their 18th loss in 25 games since June 12.
"You go 1-for-16, it's pretty hard to win a game," Yankees manager Joe Girardi said.
Tanaka concluded an uneven first half by allowing five runs and six hits in 4 1/3 innings. It was the seventh time he allowed at least five runs and seventh time that Tanaka allowed multiple home runs.
"My off-speed stuff wasn't crisp," Tanaka said through a translator. "The fastball command wasn't good. I got hurt with those two home runs. I definitely wasn't as crisp as I wanted to be."
Shaw entered 2-for-12 against Tanaka, but after Jonathan Villar and Eric Thames opened the game with singles, the third baseman slugged a full-count slider into the right-center field seats for his 19th homer.
Vogt made it 4-0 by driving a 1-1 sinker over the center-field fence for his fourth homer since being claimed off waivers from Oakland.
Frazier ended Nelson's shutout bid in the fourth by sending a first-pitch slider over the center-field wall.
NOTES: Milwaukee LF Ryan Braun (left calf tightness) did not play after exiting Saturday's game following the top of the eighth inning. He is considered day to day. ... Yankees DH Matt Holliday (viral infection) went 1-for-4 with an RBI single in his second rehab game with Triple-A Scranton/Wilkes-Barre. He is expected to rejoin the Yankees next weekend in Boston. ... Milwaukee announced RHPs Zach Davies, Jimmy Nelson and Matt Garza will start the first series after the break against the Philadelphia Phillies. ... The Yankees did not announce their rotation for after the All-Star break and manager Joe Girardi said they will likely decide Wednesday.