A former pro baseball player who is gay is speaking out against homophobia in the sport more than a year after hateful comments drove him to quit the minor leagues.

In a letter to SB Nation's Outsports published Wednesday, Tyler Dunnington wrote that he was "one of the unfortunate closeted gay athletes who experienced years of homophobia in the sport I loved." Dunnington played at three colleges and then with the St. Louis Cardinals minor league team in Florida for the 2014 season.

Some of the worst comments raised the idea of murdering gays and lesbians. A Colorado Mesa University coach bragged, "We kill gay people in Wyoming" -- a reference to the brutal death of gay college student Matthew Sheppard in 1998.

During his time with the Cardinals, a locker room conversation about a teammate's gay brother was the final straw, Dunnington told Outsports. As some other players questioned how their teammate could accept his brother, the conversation spiraled into ways to kill gay people.

"Each comment felt like a knife to my heart," Dunnington wrote. "I was miserable in a sport that used to give me life, and ultimately I decided I needed to hang up my cleats for my own sanity."

He retired from professional baseball right before spring training last year.

Cardinals general manager John Mozeliak released a statement Wednesday saying he would investigate the issues Dunnington raised, ESPN reports.

"This is very disappointing and our hope is that every player, staff member and employee feels that they are treated equally and fairly," Mozeliak said. "Given the nature of these allegations, I will certainly look into this further."

Colorado Mesa University's media relations director, Dana Nunn, said the university does not endorse the behavior Dunnington described.

"Colorado Mesa University condemns any act of intimidation, verbal or physical abuse or discrimination," Nunn said. "The university's values and expectations are that all of the members of the CMU community feel safe and supported. We fully embrace a culture of respect and inclusiveness."

While he told Outsports that his playing days are behind him, Dunnington also said he regrets quitting and hopes to re-enter baseball in a front office job.

"After gaining acceptance from my friends and family I realized I didn't have to quit baseball to find happiness," he wrote. "I not only wanted to share my story but also apologize for not using the stage I had to help change the game. Quitting isn't the way to handle adversity, and I admire the other athletes acting as trailblazers."

Minor League Baseball released a statement with some positive words from President and CEO Pat O'Conner.

"Major League Baseball and Minor League Baseball believe in fostering an environment in which players can succeed without regard to their sexual orientation. This belief is embodied in Major League Baseball's Workplace Code of Conduct against Harassment and Discrimination," said O'Conner.

He added, "We applaud Tyler for the courage and strength he displayed in deciding to live his truth, and we are pleased to hear that he continues to pursue employment in this great game. Tyler has the full support of Minor League Baseball, and we look forward to him rejoining the professional baseball family."

﻿This story has been updated with a comment from Colorado Mesa University.