Masahiro Tanaka isn’t going anywhere.

The Yankees right-hander announced Friday he will not opt out of his contract.

“I have decided to stay with the Yankees for the next three seasons,” Tanaka said in a statement. “It was a simple decision for me as I have truly enjoyed the past four years playing for this organization and for the wonderful fans of New York.

“I’m excited to continue to be a part of this team, and I’m committed to our goal of bringing a World Series Championship back to the Steinbrenner family, the Yankees organization, and the great fans of New York.”

The Yankees signed the Japanese star in January 2014 to a seven-year, $155 million contract. Tanaka faced a midnight deadline Saturday to notify the Yankees about whether he was exercising the one-time opt-out clause.

He is owed $67 million over the next three seasons, including $22 million in 2018.