PHILADELPHIA (AP) Bryce Harper made up for his offensive struggles with a spectacular, run-saving catch.
Lorenzo Cain had a career-high five hits and Mike Moustakas homered for Milwaukee.
Harper struck out three times and was hitless in four at-bats but made a diving catch on Moustakas' liner to right field with two outs, the bases loaded and scored tied in the seventh.
''I'm just trying to play the best defense I can and not let my at-bats factor in,'' said Harper, who is batting only .222 after signing a $330 million contract. ''You have to play both sides of the ball, stay focused on both sides. My pitchers need me.''
The NL East-leading Phillies then rallied in the bottom half. Jean Segura struck out swinging but reached on a wild pitch by Matt Albers (2-2). Alex Claudio entered and retired Harper on a fly to center. Junior Guerra replaced him and struck out Rhys Hoskins. But Realmuto ripped a double to left-center to score Segura for a 5-4 lead. After Hernandez walked, Odubel Herrera extended the lead to 7-4 with a two-run double.
Neither starter was effective on a cold night following a 52-minute rain delay at the start.
Phillies ace Aaron Nola lasted only three innings, giving up three runs and five hits. He had given up just three runs combined in his previous three starts.
''I threw a lot of pitches, got behind guys, but the bullpen came in and did a nice job,'' Nola said.
Adam Morgan (2-1) got four outs for the win and Pat Neshek finished for his second save.
Brewers starter Freddy Peralta allowed two runs - one earned - and seven hits in four innings, striking out five.
Moustakas blasted a solo homer into the second deck in right field to give the Brewers a 3-2 lead in the third.
Cain's RBI double off Austin Davis increased the lead to 4-2 in the fourth. But Davis then pitched out of bases-loaded jam with no outs. Yasmani Grandal grounded into a third-to-home double play and Eric Thames struck out looking.
Christian Yelich's double and Grandal's triple each knocked in runs in the first.
''We had a ton of opportunities but there wasn't a hit that could break the game open,'' Brewers manager Craig Counsell said.
Nola helped himself at the plate in the second. With runners on second and third and one out, he worked a full count and then hit a grounder to shortstop. Thames dropped the throw to first for an error, allowing both runners to score and tie the game at 2.
The Phillies honored team chairman David Montgomery with a video tribute and his name was scripted along both foul lines. Players are wearing a patch on their uniforms with his initials. Montgomery passed away last week after a battle with cancer.
Davis was recalled from Triple-A Lehigh Valley before the game. The left-hander had been optioned Sunday after being recalled on Saturday.
Brewers: OF Ryan Braun wasn't in the lineup for a third straight game because of a sore left hamstring but had a pinch-hit single.
Phillies: RHP David Robertson was told by Dr. James Andrews not to throw for three weeks to allow the flexor strain in his right elbow time to heal. Robertson hasn't pitched since April 14. There's no timetable for his return, but he is expected to miss at least another month. ... RHP Edubray Ramos was placed on the 10-day injury list with right biceps tendinitis.
RHP Brandon Woodruff (5-1, 4.25 ERA) goes for the Brewers and RHP Jerad Eickhoff (2-1, 1.50) starts for the Phillies on Tuesday night.
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports
Copyright 2019 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.