MINNEAPOLIS — It’s hard to rip a team that takes three out of four in a series, but the Yankees’ 7-4 loss to the Twins Sunday afternoon at Target Field was all kinds of ugly.

Nathan Eovaldi, though a bit better than in his three previous starts, wasn’t good enough as he coughed up a 2-0 lead against MLB’s 2016 version of the Titanic. Dellin Betances allowed an inherited runner to score and then one of his own, and Kirby Yates and Nick Goody completed a subpar day for the bullpen by each allowing a run.

Then there was the Yankees’ offense, held in check by Ervin Santana, who came in 1-7 with a 5.10 ERA.

“Very disappointing,” said Alex Rodriguez, whose single in the fourth made it 2-0. “We felt we had a really good shot at getting a win today and let one get away.”

It all swirled together for a messy loss on a sweltering, 90-degree afternoon, when Brian McCann’s two solo homers were a lone bright spot. It gave the Yankees (34-35) a ho-hum 3-3 record on a trip that started with two losses in Colorado.

“For us, it’s been frustrating that we get to that threshold of .500 and take a step back,” A-Rod said.

advertisement | advertise on newsday

After an off day Monday, the Yankees play the Rockies Tuesday and Wednesday at the Stadium, followed by three more against the Twins (21-48), baseball’s worst team, starting Friday.

“You get greedy when you win the first three of a four-game series,” Joe Girardi said. “We had the lead, 2-1, and you figure if you can get Eovaldi through the sixth you can go to Dellin and you feel pretty good about your chances, but it didn’t happen.”

Eovaldi (6-4, 5.02), who allowed 16 runs in his previous three starts, allowed four runs and six hits in 5 1/3 innings.

“I thought his stuff was better today,” Girardi said. “I thought he had better downhill plane with his fastball, I thought his slider was pretty good. I really believe he ran into some bad luck.”

Santana (2-7, 4.83) allowed three runs (two earned) and six hits in 7 1/3 innings.

Yankees videos

Max Kepler led off the fifth with a home run to cut the Yankees’ lead to 2-1. That was only the third hit allowed by Eovaldi, whose splitter looked better than it did in his last three outings.

Things suddenly came apart in the sixth. Brian Dozier blooped a one-out single to center and Trevor Plouffe singled sharply, putting runners at the corners. Eduardo Escobar shattered his bat lining a 1-and-2 fastball down the rightfield line. Dozier scored easily but Plouffe was called out at the plate on Carlos Beltran’s throw. But the call was overturned on replay and the Twins had a 3-2 lead.

Girardi brought on Betances to face Kepler, who blooped a 2-and-0, 99-mph fastball to center for a single that made it 4-2. Kepler stole second, and Kurt Suzuki ripped a full-count curve into the corner in left for a double that made it 5-2.

“I think they hit one ball hard in that inning and that was the ball Suzuki hit, but that’s baseball,” Girardi said.

Said Eovaldi: “I felt good the whole game. My slider was better today, and the split, too.”

advertisement | advertise on newsday

Dozier’s two-out homer off Yates in the seventh made it 6-2. After two errors helped the Yankees get within 6-3 in the eighth, Goody allowed a double and an RBI single in the bottom of the eighth to make it 7-3. McCann’s second homer, a blast off Kintzler in the ninth, made it 7-4.

“First month and a half, we played not good baseball,” McCann said. “We’re playing a lot better of late. We’re going to enjoy the off day tomorrow and get back at it.”