Despite widespread shock at the death of Leeds schoolteacher Ann Maguire, magistrates in Swansea heard Robert Riley saw fit to make fun of the tragedy online two days later.
Despite a backlash from other Twitter users horrified by his messages, the 42-year-old remained incredulous, saying: "Of all the sick things I've tweeted, starvation, genocide, rape and torture, it's the teacher from Leeds that outrages everyone the most."
More top news
A man who died from stab wounds in Newport has been named by police.
A fresh ballot for strikes is to be held among drivers on Arriva Trains Wales in a long-running row over pay, terms and conditions.
Politicians say how they'd alter Welsh income tax rates following a major change which could speed up the transfer of tax powers