A student has admitted posting racially offensive comments on Twitter about footballer Fabrice Muamba.
Liam Stacey, 21, appeared at Swansea magistrates' court after tweeting about the Bolton Wanderers player who collapsed during a FA Cup tie against Tottenham Hotspur on Saturday.
The 23-year-old, who suffered a cardiac arrest, remains critically ill.
Stacey, a Swansea University student from Pontypridd, admitted a racially-aggravated public order offence.
He was arrested after his comments on the social networking site were reported by other users.
He has been released on bail and is due to be sentenced on 27 March,
Prosecutor Lisa Jones told the court: "Fabrice Muamba collapsed on the pitch and was believed to have died."
The court heard shortly afterwards Stacey posted the offensive comments.
Complaints
Magistrates were told police forces across Britain received complaints following the comments.
Stacey tried to "distance himself" from the tweets by claiming his account had been hacked, the court was told.
Magistrates heard he later tried to delete his page but he was arrested on Sunday at his student house in Swansea.
When interviewed by police, Stacey said he had been drinking since lunchtime on Saturday and was drunk when he made the comments.
He told police: "I was at the bar when I heard what had happened to Muamba. I don't know why I posted it.
"I'm not racist and some of my friends are from different cultural backgrounds."
Bailed
Stacey was close to tears as the evidence was given about his tweets.
The court heard he later texted a friend and said: "I said something about Muamba that I shouldn't have and tweeted back to some people who abused me. Getting police on me now which isn't good at all."
Stacey was told in court that he could be jailed over the comments.
He has been bailed until he is sentenced and has been ordered not to use Twitter and other social networking sites.
Here are the tweets in question:
http://www.youtube.com/watch?v=nA5v2eZ5ZZE&feature=player_embedded