Zach Eflin had already allowed two runs and hit a pair of batters in Sunday's fifth inning when a 102 mph line drive rocketed into his right hand. He had already faced adversity, but now he was in pain. He ended the inning by striking out the next batter. Perhaps it was time for manager Gabe Kapler to lift him before the outing went off the rails.

But the Phillies need to find out what they have in Eflin, so Kapler elected to let him pitch one more inning of the 4-3 win over the Brewers and Eflin responded by striking out the heart of Milwaukee's lineup. Travis Shaw, Ryan Braun and Jonathan Villar all went down swinging in the sixth. The Phillies learned a bit more about Eflin, who made his spot in the rotation feel much more secure than it was a week ago.

"I was extremely frustrated after the fifth, but being a starting pitcher you have to kind of swallow that and flush it down the toilet and come back out the next inning, and go right after them like I had been doing in the first four innings," Eflin said. "Being able to come back out and put an end to what they were starting in the fifth inning was crucial."

Eflin's performance ended a four-game losing streak and helped the Phillies avoid their first sweep at home this season. A win on Tuesday — the Phillies are off Monday — would give them consecutive wins for the first time since May 13-17.

"It was huge. We needed a win today," said J.P. Crawford, who reached base twice and scored a run. "We haven't been playing well the past couple of days, and today was a good day for us. Hopefully we can get right back on track."

Eflin allowed just two runs on three hits in six innings. He struck out the final four batters he faced to tie his career-high with nine strikeouts. His last two starts have come against the National League Central's top two teams, and Eflin has held the Brewers and Cubs to a combined three earned runs over 13 2/3 innings.

He entered last week's start at Wrigley Field with his rotation spot on the line. The Phillies have two starters — Cole Irvin and Enyel De Los Santos — waiting at triple A. Eflin responded to that adversity the same way he did on Sunday.

"We've asked Ef to go back and look at how he gets his empty swings and I think the biggest change is him being responsible for taking that step forward, him deciding how he's going to get the swings and misses," Kapler said. "It's explosive fastballs up to lefthanded batters and using that four-seamer instead of that two-seamer, sometimes, to lefthanders has made a huge difference. He threw some great change-ups today, too."

Seranthony Dominguez allowed one run, throwing 41 pitches to finish the seventh and eighth innings. Luis Garcia and Tommy Hunter handled the ninth. Rhys Hoskins, playing with a fractured jaw, drove in two runs. He has five RBIs in his first two games since returning from the disabled list, which equals the amount he had in his last 67 plate appearances before heading to the DL.

Kapler nearly pulled Eflin after the fifth as the Phillies trailed by a run and needed some offense. But Crawford and Andrew Knapp reached base to start the bottom of the fifth, which brought up Eflin with no outs and two runners on. It was "kind of cool," Kapler said, that he could keep Eflin in to bunt instead of lifting him for a pinch-hitter. Eflin dropped down a sacrifice bunt and the Brewers threw to third to get Crawford, but he beat the throw.

"I saw both of the guys crashing so I knew something was up and they were going to try to get me," Crawford said. "I was always taught to play the game hard and run through the base so I played the game hard."

A rally was born. The Phillies would score three times, the last run being scored by Eflin. The pitcher then returned to the mound, retired his three batters and erased any doubt.

"I go out every outing with the intent for it to be my best, but especially when you have a team that beats us twice in a row, you really kind of bear down," Eflin said. "I wouldn't say try harder, but you want to make sure you limit your mistakes and put a stop to what's happening."