Denny McLain (inset) kept throwing meatballs to Mickey Mantle until the Yankees legend hit his 535th homer to move past Jimmie Foxx into third place on the home run list at the time. Photo: Getty Images; AP

Denny McLain had a feeling something was going on as soon as Derek Jeter lined a double in the first inning of Tuesday night’s All-Star Game.

“It was a great pitch,” McLain said of Adam Wainwright’s offering to Jeter. “Down the middle and belt high. The last time I saw a pitch like that, I hit the only home run of my career. It was the perfect pitch for the moment.”

And McLain knows about serving up hittable pitches, having thrown one of the most famous of all. On Sept. 19, 1968, he kept firing balls over the heart of the plate to his hero, Mickey Mantle.

After Mantle botched several attempts, the Hall of Famer finally hit a home run, the 535th of his career. At the time, that blast put Mantle in sole possession of third place on the all-time list, breaking a tie with Jimmie Foxx.

Following the game, McLain did not admit what he had done. He believes Wainwright erred in doing so Tuesday.

“He should’ve left it alone,” McLain said in a phone interview Wednesday. “It took away from the game. We didn’t go on record about the Mantle thing until much later.”

Despite the controversy Wainwright ignited when he said he wanted to give Jeter “a couple pipe shots” in the shortstop’s final All-Star Game, McLain said the pitcher shouldn’t be criticized for his role.

“It was the right thing to do,” McLain said. “I know [Wainwright] backed off what he said later on, but Jeter still had to hit the ball, just like Mantle had to hit mine.”

McLain’s only quibble with Wainwright was his comments afterward.

“He just didn’t need to say anything,” McLain said. “At a later time, it might have been OK. I was shocked when he came out with it.

“I told people: ‘He’s hit 534 already, of course he could hit another one off me,’’ McLain recalled. “I saw [Wainwright] backed off after the game and said he missed his spot, but he’s too good a pitcher to miss his spot like that.”

McLain — who was en route to his 31st win in an MVP and Cy Young-winning season for the eventual World Series champs — has never regretted his decision.

“Mickey Mantle was my idol,” McLain said. “It was the right situation: We had clinched the pennant and were up 6-1 in the game. It wasn’t like he was going to hit a six-run homer.”

It was also Mantle’s final trip to Detroit, so in the eighth inning, McLain called catcher Jim Price out to the mound to tell him his plan.

“Then Mantle took the first two pitches,” McLain said. “That’s when I realized we weren’t dealing with a Rhodes Scholar. The next pitch he fouled off. I said, ‘If this goes on much longer, I’m going to be indicted.’ Price came out one more time and I said, ‘Let’s get this over with,’ and he hit the next one nine miles.”

More than three decades later in a troubled life that included a prison term on racketeering charges, McLain insists he never has had any second thoughts about his “pipe shot” to Mantle.

“I didn’t ever regret it for one minute,” McLain said. “There was no downside. It’s a great memory.”