Masahiro Tanaka might have become the main topic of conversation on Opening Day had a controversy-fueled eighth inning not relegated him to sidebar status.

Tanaka essentially erased an uneven spring training with a strong start against the Astros, yielding two runs and four hits and striking out four in 5 2⁄3 innings. He left with the score tied at 2. It morphed into a 5-3 Yankees loss.

Crew chief Dana DeMuth’s decision not to call interference on baserunner Carlos Correa led to the Astros’ three-run eighth and inspired Joe Girardi’s postgame rhetoric. He cooled it momentarily to give Tanaka some props.

See alsoBoxscore: Yankees vs. AstrosInteractiveMeet the 2016 Yankees

“I thought he threw pretty well,’’ Girardi said. “I just thought he was kind of getting to the end of his rope.’’

The Yankees led 2-0, and Tanaka was perfect for the first three innings. He would have retired 10 straight if leftfielder Aaron Hicks had not misjudged a line drive by Jose Altuve leading off the fourth. “At the crack of the bat I thought it was going to be right at me,’’ Hicks said. “I got caught flat footed and just didn’t make the play.’’ The ball sailed over Hicks’ head for a double and set up Houston’s first run.

Tanaka, who gave up 41 home runs in his first two seasons with the Yankees, was tagged by Correa for a tying shot to right with two outs in the sixth. After Tanaka walked Colby Rasmus, Girardi brought in Chasen Shreve.

advertisement | advertise on newsday

Tanaka, who threw 87 pitches, had no issue with the removal. “Overall, I felt that I pitched pretty well,’’ he said through a translator. “As we got deeper into the game I felt like I lost the strike zone a little bit, so that’s probably why I had to leave the game. I just wasn’t able to really get that precise control toward the end of the game.

“As far as the home run, that was a mistake on me and he took full advantage of it. The intention was to get the splitter a little bit lower, below the knees. I think that it’s important to keep the home runs down.’’ Last season, Tanaka allowed 25 in 24 starts, covering 154 innings.

Tanaka had a 7.36 ERA in spring training, but Brian McCann said he can put that behind him. “I thought he threw the ball really well,’’ the catcher said. “He really had his sinker going, some really good movement, kept them off balance. Spring training is spring training. You’re trying to clear hurdles. You’re just trying to get ready for this, and today he executed.’’

Yankees videos

So, amid their frustration over DeMuth’s non-call, the Yankees found a positive in Tanaka’s start.

“I’ve never read a rulebook, I don’t know anything about rules,’’ Alex Rodriguez said. “We didn’t win the game but I think there were some things to build on. Tanaka certainly was one of those. If we get that type of starting pitching, we’re going to win a lot of games.’’