The Chicago Cubs signed Manny Ramirez to be a player and coach at their Triple-A affiliate in Iowa.

Cubs president of baseball operations Theo Epstein made the announcement in a press release on Sunday.

“While Manny is not and will not be a fit on the Cubs’ major league roster, we do think at this stage of his life he’s a nice fit as a mentor for some of the young talented hitters we have in the organization,” Epstein said. “Manny will coach full-time and play part-time in a limited role that does not take at-bats away from our prospects.

“If he shows there is still some magic in his bat, perhaps he will find his way to the major leagues and help another team, but that is not why he is here. We are thrilled that he wants to work with our young hitters and make a difference.”

Ramirez, 41, is taking at-bats in extended spring training games at the Cubs’ facility in Mesa, Ariz., before joining the Iowa Cubs.

“I’m at the stage of my life and career where I really want to give something back to the game that I love — the game that has meant so much to me and done so much for me and my family,” Ramirez said in the team’s press release. “I know I am nearing the end of my playing days, but I have a lot of knowledge to pass on to the next generation — both what to do and what not to do.”

In 19 major-league seasons, Ramirez batted .312 with 2,574 hits, 555 home runs and 1,831 RBIs. He helped the Boston Red Sox win World Series titles in 2004 and 2007 when Epstein was the team’s general manager.

Ramirez, a 12-time All-Star, last played in the major leagues during a five-game stint with the Tampa Bay Rays in 2011. He was suspended in 2009 and 2011 for testing positive for performance-enhancing substances. However, Epstein believes Ramirez will be a positive influence on the Cubs’ prospects.

“Manny is not only one of the best hitters of all time, he is also a dedicated student of hitting and has proven to be a gifted teacher with younger teammates who have worked with him in the batting cage,” Epstein said. “Behind the scenes he has always been a tireless worker who is very serious about the craft of hitting.

“Manny has made real mistakes in the past but he has owned up to them and moved his life in a positive direction the last couple of years. He is in a really great place right now and wants to share the lessons he’s learned along the way. We think he deserves another chance and that our young hitters will benefit from it.”

The Cubs have some of the top offensive prospects in the game, including shortstop Javier Baez and outfielders Kris Bryant and Albert Almora. However, Baez is struggling with a .203 batting average with Iowa.

“The Cubs have some very talented young hitters, and I would love nothing more than to make a positive impact on their careers,” Ramirez said. “I am passionate about baseball and about hitting, and I have a lot to offer. While I would love to return to the major leagues, I leave that in God’s hands. My focus will be on working with the young hitters, making sure they don’t make the same mistakes I made, and helping the team any way I can.”