A former baseball player has talked about having quit the sport after hearing coaches and other players talking about “killing gay people”.

Tyler Dunnington, a former minor league pitcher with the St Louis Cardinals, made the revelation in an interview with Outsports.com.

He said he had not yet come out when he pitched in rookie and Class A baseball for the Cardinals in 2014.

“I was also one of the unfortunate closeted gay athletes who experienced years of homophobia in the sport I loved,” Dunnington told the site.

“I was able to take most of it with a grain of salt but towards the end of my career I could tell it was affecting my relationships with people, my performance, and my overall happiness.”

RELATED: CHECK OUT WHAT HAPPENED WHEN RIVAL HOCKEY TEAM FANS LOCKED LIPS DURING A GAME

Going on, he said: “I experienced both coaches and players make remarks on killing gay people during my time in baseball, and each comment felt like a knife to my heart. 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.”

The team’s general manager John Mozeliak, did not deny the allegations, and described them as “very disappointing”.

He also committed to look into them further.

Speaking to MLB.com, he said: “Our hope is that every player, staff member, and employee feels they are treated equally and fairly.”

“Given the nature of these allegations I will certainly look into this further as well as speak with Billy Bean of the commissioner’s office for further assistance on this matter … we will take this very seriously.”