Milwaukee Brewers closer Josh Hader is as good as it gets when it comes to securing a win. But even the best in the game can have an off night. 

Hader surrendered two home runs in the top of the ninth inning, blowing his first save since June 7, 2021, and the Philadelphia Phillies beat the Brewers 3-2 Tuesday night in Milwaukee.

Josh Hader Milwaukee Brewers vs Phillies

Alec Bohm of the Philadelphia Phillies runs the bases following a solo home run against the Brewers during the ninth inning at American Family Field on June 7, 2022, in Milwaukee, Wisconsin.  (Stacy Revere/Getty Images)

Entering the game, Hader sat at 40 consecutive appearances of scoreless pitching, having not surrendered a run since last season. The 40 appearances without a run surrendered tied Ryan Pressly of the Houston Astros for the major league record. 

With Milwaukee leading 2-1, Hader entered the game in the ninth having not surrendered a run in 19 appearances this year, throwing 17.2 innings of scoreless ball. That streak quickly came to an end.

BREWERS’ CLOSER JOSH HADER STEPS AWAY FROM TEAM TO BE WITH WIFE DURING PREGNANCY ‘COMPLICATIONS’

Phillies third baseman Alec Bohm took Hader deep in the first at-bat of the inning, tying the game 2-2. 

After getting second baseman Bryson Stott to fly out, Hader then gave up his second home run of the inning, a 416-foot shot to pinch-hitter Matt Vierling. 

PHILLIES’ ALEC BOHM BLOODIED AFTER ACCIDENTALLY HITTING HIMSELF IN FACE WITH BAT IN FRUSTRATION 

"They definitely got to me today," Hader said. "Tip the cap. It definitely sucks, but it happens.''

Josh Hader enters the game against the Phillies

Josh Hader of the Brewers takes the field against the Philadelphia Phillies on June 7, 2022, in Milwaukee.  (Stacy Revere/Getty Images)

Brewers manager Craig Counsell told reporters that he wished his squad could have given Hader more than just a one-run cushion heading into the ninth inning. 

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

"Unfortunately, we could only give him a one-run lead going into that inning, and we paid a price for it,'' Counsell said. "He's been so good. It's surprising, but at some point it's going to happen.''

Josh Hader Milwaukee Brewers vs Padres

Josh Hader of the Brewers gets ready to pitch against the San Diego Padres at American Family Field on June 5, 2022, in Milwaukee.  (John Fisher/Getty Images)

Hader’s blown save ended his streak of 32 straight saves, which was MLB’s longest active streak, according to ESPN Stats & Info. 

CLICK HERE TO GET THE FOX NEWS APP

"The scoreless streak, that was pretty cool,'' Hader said. "I was hoping to get another one, but it's baseball. It'll keep you honest.''

PHILLIES FIRE MANAGER JOE GIRARDI AFTER ROUGH START TO SEASON

The loss for Milwaukee is their fourth in a row, and the team’s sixth loss in the past seven games. 

Philadelphia, who fired manager Joe Girardi on Friday, has now won five games in a row. 

The Associated Press contributed to this report