Let us know what you think and join the conversation at the bottom of this article.
Niall Sheriden stamped on the defenceless animal around 10 times before grabbing a knife and repeatedly stabbing it.
His final acts of cruelty saw the hedgehog bludgeoned with a plastic safety cone and a pool cue.
Irvine Welsh: Trainspotting author marries former Taggart star Emma Currie
West Lothian crime: Man, 43, caught riding an electric scooter with his 10-year-old son as passenger in Livingston
Edinburgh crime: Police seize £40,000 worth of cocaine and £400 worth of cannabis from streets of Edinburgh
Tom Jones Edinburgh: Princes Street Gardens concert stage times, support, setlist and how to get there
West Lothian crime: 'Horrendous' child rapist labelled 'utterly appalling' by judge
And after he was arrested Sheriden, 22, issued threats to police officers by shouting he would “slit their throat” and harm their families.
A horrific description of the 20 minute attack on the animal was read out as Sheriden appeared via video link at Edinburgh Sheriff Court to plead guilty to four charges.
Prosecutor Jack Caster told the court Sheriden turned up outside a homeless accommodation unit in Loanhead, Midlothian, at around midnight on July 12 this year.
He was initially refused entry due to his “agitated and intoxicated” behaviour but was let into the building by a male friend who arrived separately but at the same time.
The pair began to engage in “play fighting” and were seen grappling with each other in a corridor.
Mr Caster said Sheriden then left Kilbreck House and returned “ a short time later carrying a hedgehog” which was “wrapped in a hoodie”.
The court was told Sheriden and his friend continued to ‘play fight’ on the building’s first floor and the hedgehog was seen to be “thrown down the corridor”.
Mr Caster said: “Mr Sheriden approached the hedgehog and kicked it a number of times.
“He opened the door of a room and kicked it into the room. The second male takes it back out of the room back onto the floor of the corridor.
“Mr Sheriden is then observed running up to hedgehog and stomping on it twice.
“Mr Sheriden pushes the second male away and runs up the hedgehog and stamps on it a further 10 times.”
The fiscal said Sheriden is then seen with a knife and he proceeds to “strike the hedgehog approximately 10 times”.
The fiscal continued: “Thereafter he walks down the corridor and picks up a wet floor cone and throws it at the second male. He picks it up and uses the cone to strike the hedgehog.
“He then runs back and forth up the corridor stamping hard on the hedgehog as he does this.”
Mr Caster said both males were seen to “laughing and joking” and were taking pictures of each other on a mobile phone.
Sheriden also let off a fire extinguisher at his friend and the incident only ended when police arrived on the scene.
The court was told the violent attack on the hedgehog was captured on CCTV and lasted around 20 minutes.
Sheriden then issued threats of violence towards police officers and their families after he had been arrested and taken to Falkirk police station.
Officers were forced to place handcuffs, leg restraints and a spit hood on him due to his unruly behaviour.
Sheriden was said to have told officers he would “slit their throats” and “harm their families”.
The court also heard the dead female hedgehog was taken to a vet whose opinion was the animal’s “death was not instantaneous”.
Lawyer Emma Martin, defending, said she would reserve her mitigation to the sentencing hearing.
Sheriff Daniel Kelly remanded Sheriden in custody and deferred sentence to next month.