The high court cancelled the one-year jail term handed down in March 2017 by Spain's top criminal court to Cassandra Vera, 22, after finding her guilty of humiliating victims of terrorism.
It considered that the jokes she posted about "an attack that happened 44 years ago, without any offensive comment towards the victim, is socially and even morally reproachable in that it makes fun of a serious human tragedy, but a criminal sanction is not reasonable."
Vera published 12 tweets between 2013 and 2015 about the assassination of Luis Carrero Blanco, the prime minister and heir apparent of dictator Francisco Franco who was killed in a car bomb attack in Madrid in December 1973 carried out by Basque separatist group ETA.
The massive explosion sent the car Carrero Blanco was travelling in hurtling into the air and over the roof of a church where he had just been attending mass.
"ETA combined a policy against the use of official vehicles with a space programme," read one of Vera's posts. Another said: "Did Carrero Blanco also go back to the future with his car?"
Vera's case raised questions over freedom of expression in Spain.
Even the granddaughter of Carrero Blanco attacked the move by public prosecutors to charge and put her on trial, saying in a letter sent to daily El Pais in January 2017 that while the jokes were in poor taste they were not worthy of such legal action.
"I'm scared of a society in which freedom of expression, however regrettable it may be, can lead to jail sentences," Lucia Carrero Blanco wrote.
Vera's case is not the only one that has caused concern.
A rapper known as Valtonyc has for his part been sentenced to three-and-a-half years in prison for a series of lyrics that the courts ruled glorified terrorism and insulted the Spanish crown.
Vera said she was relieved by the Supreme Court decision.
"Really happy at a personal level for the end of a judicial ordeal which no one should have to experience," she tweeted.
"But very concerned over other sentences like that of Valtonyc and other rappers and Twitter users."