Image copyright Getty Images Image caption It is unclear whether the song heralds an album of new material from the star

Bob Dylan's first new song in eight years is a 17-minute rumination on the 1960s and the assassination of JFK.

"They blew out the brains of the king / Thousands were watching at home and saw the whole thing," he sings in the opening minutes of Murder Most Foul.

But the visceral account of President Kennedy's murder in 1963 gives way to a rumination on America and music.

The track arrived unannounced at midnight, with Dylan explaining it had been "recorded a while back".

"Greetings to my fans and followers with gratitude for all your support and loyalty over the years," said the Pulitzer and Nobel Prize winner in a statement.

"This is an unreleased song we recorded a while back that you might find interesting. Stay safe, stay observant, and may God be with you."

He gave no further clues about its vintage, but the delicate, almost conversational vocals are reminiscent of his more recent live shows.

Musically, it's spacious and haunting, with a dusting of piano, a sorrowful violin, and slow, brushed percussion - and while interpreting the lyrics would require weeks of scholarship, two lines in particular suggest Dylan may have chosen to release the song now as a commentary on US politics.

"The day they killed him, someone said to me, 'Son, the age of the Antichrist has just only begun,'" he sings around the nine-minute mark.

"I said, 'The soul of a nation's been torn away, and it's beginning to go into a slow decay.' And that it's 36 hours past judgement day."

As well as Kennedy's assassination, the song makes allusions to pop culture, from Nightmare on Elm Street and The Merchant of Venice to The Beatles' I Want To Hold Your Hand and even Billy Joel's Only The Good Die Young.

The last five minutes are almost a catalogue of his favourite music, referencing Stevie Nicks, Nat King Cole, The Eagles, Cole Porter's Anything Goes, Beethoven's Moonlight Sonata, and jazz greats like Stan Getz and Charlie Parker.

According to Dylanologists, Murder Most Foul is the longest song Dylan has ever released, with its running time of 16 minutes 57 seconds narrowly eclipsing 1997's Highlands, which ran to 16 minutes 31 seconds.

It's unclear whether the song is connected to a larger piece of work, but the 78-year-old hasn't released an album of original songs since 2012's Tempest.

That record's title track was also an extended song about a historical event, the sinking of the Titanic.

Since then, Dylan has released three albums of covers, many of which were originally sung by Frank Sinatra - Shadows in the Night (2015), Fallen Angels (2016) and Triplicate (2017).

He has also released new editions of his ongoing Bootleg Series, collecting unreleased studio sessions from his career. The most recent volume focused on the years 1967-69 and his appearances on Johnny Cash's TV show.

Follow us on Facebook, or on Twitter @BBCNewsEnts. If you have a story suggestion email entertainment.news@bbc.co.uk.