Thad Matta says the past 13 years have been some of the greatest of his life and thanks Buckeye nation for an incredible run. (1:06)

Thad Matta will no longer be the men's basketball coach at Ohio State, effective immediately, the university announced Monday.

Athletic director Gene Smith said a conversation between him and Matta led to the determination that a change was needed.

"I felt comfortable after the season when I sat down with Thad that we had a plan. [But] recruiting is a major part of it, and we weren't winning the recruiting battles," Smith said. "As we started talking about it Friday, the flow of the conversation took me to the realization as I said to him, 'This might be the time to make a leadership change,' and he agreed."

One source told ESPN that Matta wanted to keep coaching. At a news conference Monday, Matta said "never say never" to the possibility of him returning to the sideline.

Matta mentioned "trying to get healthy" as one reason for leaving the job. He has battled health issues for much of his time in Columbus, including emergency back surgery in 2007. He wears a brace on his right foot due to nerve damage.

"This has probably been the greatest 13 years of my life,'' Matta said, his voice breaking as he quoted lyrics from the Grateful Dead. "Sometimes the light's all shinin' on me, other times I can barely see. Lately it occurs to me what a long, strange trip it's been.''

Smith said the Buckeyes will conduct a national search for their next coach. He also said Ohio State will honor the remaining three years on Matta's contract.

Thad Matta is out as Ohio State coach effective immediately, the university announced Monday. Matta is the school's all-time leader in wins (337) and games coached (460). Brian Spurlock/USA TODAY Sports

Matta, who will turn 50 in July, had been the Buckeyes' coach for 13 seasons. He went 337-123, winning at least 20 games in every season but 2016-17. Ohio State was ineligible for the postseason in Matta's first season, 2004-05, but the Buckeyes went to the NCAA tournament in nine of the next 10 seasons.

However, Ohio State has struggled the past two seasons, failing to advance to the NCAA tournament. The Buckeyes were 17-15 last season and went to the NIT in 2015-16.

Matta led Ohio State to a national title game appearance in 2007, when it lost to Florida. The Buckeyes also reached the Final Four in 2012.

During Matta's tenure, Ohio State won five Big Ten regular-season titles and four Big Ten tournament titles. Ten Buckeyes were selected in the NBA draft: Greg Oden, Mike Conley and Daequan Cook in 2007; Kosta Koufos (2008); B.J. Mullens (2009); Evan Turner (2010); Jon Diebler (2011); Jared Sullinger (2012); Deshaun Thomas (2013); and D'Angelo Russell (2015).

"I was honored to be coached by and taught so many lessons from a great person," Oden told ESPN after the announcement. "He has helped me in so many ways as a player and a young man."

Prior to Ohio State, Matta was the head coach at Xavier for three seasons, making three consecutive NCAA tournament appearances -- including an Elite Eight run in 2004. Matta also spent one season at Butler, where he guided the Bulldogs to a second-round NCAA tournament appearance. He has a career record of 439-154.

The Illinois native had stints as an assistant coach at Indiana State, Butler, Miami (Ohio) and Western Carolina.

"The last thing I hope I'm remembered for is that we always did it the right way,'' Matta said. "And that to me is something I'm going to hang my hat on, that this program was run the right way.''

The Associated Press contributed to this report.