A Scottish professional footballer walked out of a football stadium and announced his retirement in the middle of a match after alleging an opposing player made a slur against him relating to a failed suicide attempt.

David Cox was on the bench for his club Albion Rovers against Stenhousemuir on Thursday night when he made the decision to turn his back on the game.

The 32-year-old former Kilmarnock striker has openly discussed his struggles with mental health in the past, admitting he tried to kill himself.

Cox alleges an opposing player told him “he should have done it right the first time” during an altercation between the two benches.

Cox walked out of the stadium at half-time and took to social media to announce his retirement from the game.

Speaking on Facebook he said: "The second half is just starting, Albion Rovers and Stenhousemuir, I have left the stadium.

"I wasn't playing tonight I was on the bench, one of the boys on the Stenny team... we were having a wee bit of to-and-fro on the bench and they had a wee go at my mental health. Told me I should have done it right the first time.

"So I promised myself the next time it happened I'd walk off the park.

“Obviously I wasn't playing (but)... I am done with football. Completely.

"Some folk might not think it's a big deal, I'm f*****g fed up listening to it.

Bradford Telegraph and Argus: David Cox explained his decision on Facebook Live. David Cox explained his decision on Facebook Live.

"Don't get paid enough for it and they'd put me on the park I'd probably have broken the boy's legs deliberately.

"I tried to speak to the referees about it, they didn't want to know because they didn't hear it. Same s*** we're talking about all the time, we talk about racism and the personal issues that get brought up in football, but if it's not heard by officials or whatever there's nothing they can do about it.

"So I'm going to do something about it and for me it's leaving the game. I'm done with it.

"It was one of the reasons I wasn't going back to football, I did in January but I'm done with it.

"Because I either keep playing and I'm going to batter somebody on the park, which will result in me being the bad one.

"Once he was called out on it he knew what he said and tried to deny it.”

He added: "Nothing gets done about it, nothing is going to get done about it. Football is full of s**** with the things that they say and it's going to continue to happen.

"So, aye, I'm done. Hanging the boots up for good. I've just walked away there, I'm off in the middle of the game.

"I'm not doing it."

Albion Rovers stood behind their former player following the “unforgiveable incident”.

Speaking on Twitter the club said: “We stand with David Cox.

“The unforgivable incident that occurred during tonight's match must not be downplayed.

“David, you have all at Albion Rovers and Scottish football's unconditional support.”