There was a moment Tuesday — about the time Eddie Rosario's two-run home run landed behind the center-field wall to tie the score — when it looked like the Twins, despite all their flaws, were going to pull out another victory.

But they couldn't stop making mistakes.

After Rosario's pinch-hit homer in the bottom of the eighth inning, the Twins botched the top of the ninth, enabling the Brewers to escape with a 6-5 victory at Target Field. The Twins' four-game winning streak came to an abrupt halt thanks to errors by rookie outfielders Miguel Sano and Byron Buxton and a bad day on the mound by Ervin Santana.

"There were a couple miscues out there," Twins manager Paul Molitor said. "Pretty obvious to see." The flaws spanned offense, defense and pitching.

Down 5-2 in the eighth, Byung Ho Park smashed a solo home run into the second deck in left to make it 5-3, his team-high fourth homer and third in four games. Eduardo Escobar singled, then Rosario, pinch hitting for catcher John Ryan Murphy, belted a two-run homer to center to tie the score at 5-5.

But Milwaukee got a break in the ninth when Yadiel Rivera crushed a pitch from reliever Kevin Jepsen to right-center for a double, then went to third when Buxton dropped the ball — twice — while trying to corral it and throw it in. It was Buxton's first career error in the major leagues.

Scooter Gennett then slapped a Jepsen curveball through a pulled-in infield to drive in Rivera and give Milwaukee a 6-5 lead. Brewers closer Jeremy Jeffress pitched a scoreless ninth, and that was that. The Twins and Brewers now take this interleague rivalry series to Miller Park for two games.

"The game is hard," said Jepsen, who fell to 0-3 only 14 games into the season. "You give guys extra outs or extra bases, those tend to turn into runs and wins. It obviously is not the way we want to get it done. I think we have a great defense and a couple things just didn't go our way."

Milwaukee jumped on Santana for two runs in the first inning, as the righthander had trouble with his slider and wasn't aggressive early in the count. The Twins loaded the bases with no outs in each the first two innings against Brewers righthander Wily Peralta, but they managed to score only one run each time, on a double-play grounder in the first and an RBI groundout in the second.

The Twins, 2-for-11 with runners in scoring position Tuesday, were setting themselves up to lose.

The fifth inning might have been the Twins' worst of the year, when Milwaukee scored three runs to take a 5-2 lead.

It began when Gennett sent a sinking line drive toward Sano in right field. Sano didn't see the ball well, stuck out his glove and missed it. The ball rolled to the wall as Gennett reached second.

WATCH SANO'S ERROR

"There's nothing I can say, like an excuse or something like that," Sano said. "I make a mistake, everybody can make a mistake in the game."

Santana looked toward the sky in disbelief, but he was off his game as well. Following the error, Santana walked Ryan Braun and gave up an RBI double to Jonathan Lucroy and a sacrifice fly by Chris Carter as Milwaukee took a 4-2 lead. Then, while facing Kirk Nieuwenhuis, Santana uncorked a wild pitch to send Lucroy to third; three pitches later, Murphy couldn't handle a Santana pitch for a passed ball that enabled Lucroy to score.

Brewers fans in attendance cheered "Luuuu" for Lucroy … but there were some boos from Twins fans mixed in, too.

Sano's error was a glaring one that likely cost them the game, but Buxton, Jepsen, Santana, Murphy and the Twins' feeble offense also had a hand in the loss. It was a rough way to end a 4-4 homestand in which they responded to an 0-9 start to the season by winning four consecutive games.

"Things aren't going our way right now," Santana said. "You just have to keep it up and keep playing."