By STEVEN WINE
AP Sports Writer

MIAMI (AP) — The Milwaukee Brewers committed three errors, managed only five hits and went 0 for 8 with runners in scoring position.

Even so, they went down swinging.

A bizarre ninth-inning rally fell short when Jonathan Villar struck out with the bases loaded, and Milwaukee lost Monday to the Miami Marlins, 4-1.

Trailing by four runs to start the ninth, the Brewers saw 39 pitches and didn’t hit one. Miami closer A.J. Ramos struck out two but also walked the bases loaded and was replaced by Bryan Morris, who walked in a run.

Morris then struck out Villar for his first career save.

“We had the winning run up,” Brewers manager Craig Counsell said. “We had some patient at-bats and took what they were giving us. But it was a little bit too big of a hole.”

The big hit never came for the Brewers. They had at least one runner in every inning, but Jose Fernandez (4-2) pitched around four walks to throw seven shutout innings.

Milwaukee’s best chance might have come in the first, when Villar led off with a double and Alex Presley walked. Ryan Braun then flied out to the warning track, and Chris Carter grounded into a double play.

“Braun hit a ball that’s out in most parks,” Counsell said. “That was our best chance against Fernandez. It was clear the first couple hitters he was out of sync, but with these starters you’ve got to try to get them before they get in sync.”

Fernandez pitched well enough to overcome a teammate’s home run that was negated due to a baserunning blunder. With the game scoreless in the second inning, J.T. Realmuto’s homer was negated when he passed teammate Marcell Ozuna after rounding first base, costing Miami a run.

Realmuto’s hit struck the home run sculpture in center field. Ozuna, who was on first base, misjudged the fly and retreated to first, and Realmuto trotted past him.

First base umpire Mike DiMuro didn’t notice the gaffe, but the Brewers did. After Ozuna and Realmuto crossed the plate, Counsell challenged the two-run homer, and the play was overturned.

“Realmuto passed the runner,” Counsell said. “It’s simple. A lot of people saw it.”

Realmuto was credited with a single and an RBI and ruled out at second base, and Ozuna scored to give Miami a 1-0 lead.

The Brewers missed a similar blunder by an opponent earlier this season. The Cardinals’ Randal Grichuk hit a two-run homer and passed teammate Brandon Moss rounding first base, but the Brewers didn’t challenge and the umpires also failed to see the mistake.

Adeiny Hechavarria’s bases-loaded single drove in a run in the sixth against Wily Peralta (2-4), who went six innings and allowed two runs — plus the homer that didn’t count. Peralta pitched for the first time since returning from paternity leave for the birth of his daughter.

“Overall I think I did OK,” Peralta said. “It has been an exciting week for me. I’m happy to be back.”

Join our Newsletter for the latest news right to your inbox