The Twins’ good-Ervin-bad-Ervin problem just won’t go away.

An All-Star and a Cy Young contender when his stuff is on, Ervin Santana continues to bedevil the Twins with occasional outings where he appears to be pitching batting practice. Santana delivered another of the latter type Friday, recording a season-low 10 outs, surrendering five runs and absorbing the loss in Detroit’s 6-3 victory over the Twins at Target Field.

“Not my best stuff today,” Santana shrugged after falling to 11-7 on the season but 6-7 since May 7. “Behind the count all the time — that’s what happens.”

It happens with an odd and disconcerting frequency for such an effective pitcher. It’s not just that Santana is better on some nights than others — that’s true of every pitcher in baseball. As Twins manager Paul Molitor gamely put it before Santana’s latest outing: “I don’t worry about Erv. He’s had a couple stretches where maybe his outings weren’t what we had seen early in the year. But it’s inevitable that you’re going to have a little bit of ebb and flow.”

The trouble is, Santana’s flow is spectacular, a righthanded Clayton Kershaw. But his ebb? It’s ebb-ysmal.

Santana is tied for the major league lead in shutout starts, with seven. But he’s also given up five or more runs seven times, just one behind the MLB lead.

“I don’t know if I have an answer to that. As well as he’s pitched the majority of starts, there’s still been some games where the numbers get a little crooked,” Molitor said. “You could tell tonight after the second inning, he just started laboring a little more. It wasn’t his best night.”

It was a pretty good one for Victor Martinez, who smacked a pair of 400-foot home runs off Bad Ervin that made him one of the best power-hitting opponents in Target Field history, moving into a tie for the fifth-most homers, just three behind leaders Salvador Perez and Jose Bautista.

The Tigers scored a run in the third inning on an RBI double by Justin Upton, and the fourth inning, Santana’s last, began with a double by Nick Castellanos, Martinez’s second home run, a triple by Mikie Mahtook, a groundout by ex-Twin Alex Presley, a wild pitch that scored Mahtook and a walk to Jose Iglesias that ended Santana’s night after 95 labored pitches.

All the Tigers offense amounted to the seventh game this season in 20 starts that Santana allowed five or more runs. His ERA in those seven outings: 9.84. But every one of the other 13 starts have been quality starts; in an amazing seven of them, he hasn’t allowed a single run. His ERA in those games? It’s 0.77. Someone call Cooperstown.

The worst part for the Twins, who entered the night just a half-game out of the AL Central lead, is that this was supposed to be the automatic win during the Tigers’ three-game stay in Minneapolis. Opposing the Twins’ ace was Anibal Sanchez, whose 6.08 ERA and demotion to Class AAA Toledo two months ago reflected the difficulty he’s had restoring his career.

But Sanchez looked like the Twin-killer of old — he has a 3.65 ERA in 20 starts against Minnesota — helping the Tigers put five zeros up in the six innings he started. Only a Miguel Sano RBI single and a two-out, two-run single by Ehire Adrianza marred an otherwise easy outing.