A student who mocked former Blues player Fabrice Muamba on Twitter after he collapsed during a match has been jailed for making racist comments.

Liam Stacey, 21, provoked revulsion with comments made while the Bolton Wanderers star still lay on the pitch.

The 23-year-old midfielder was left fighting for his life after suffering a heart attack during an FA Cup tie on March 17.

Horrified fans watched live on TV as he fell to the ground during the quarter-final clash at Tottenham Hotspur.

Police were inundated with complaints as members of the public reported the student’s comments.

Stacey, a Swansea University biology undergraduate, was quickly tracked down and arrested.

Last week he admitted making racist comments when he appeared briefly at Swansea Magistrates’ Court and has now been jailed for 56 days at the same court.

The first of Stacey’s messages began with “LOL (laugh out loud). **** Muamba. He’s dead!!!”

A number of people including former Villa player and broadcaster Stan Collymore - himself the victim of abuse on Twitter - took him to task for his views and he responded with a further string of offensive comments aimed at other Twitter users.

Muamba’s recovery since suffering a cardiac arrest 10 days ago has been described as “miraculous”.

He remains in intensive care in hospital where his condition is described as serious but stable.

Stacey broke down as he was taken away in handcuffs to a holding cell beneath Swansea Magistrates’ Court.

He was led past the public gallery, where he was briefly embraced by friends and his parents as he shook with emotion.

Moments earlier, District Judge John Charles told him: “In my view there is no alternative to an immediate prison sentence.”

He said that when Muamba collapsed, “it was not the football world who was praying for him... everybody was praying for his life”.

He added that abusive remarks made to Stacey “via a social networking site were instigated as a result of vile and abhorrent comments made as a result of a young man who was fighting for his life”.

He has since been thrown off his course and expelled from the university.