Rapper Eminem has slammed US presidential candidate Donald Trump as a “loose cannon” in a new track called Campaign Speech.

He dropped the nearly eight-minute long politically charged song, which also mentions shooting victim Trayvon Martin, to announce upcoming new music.

The 44-year-old – real name Marshall Mathers – wrote on his social media pages: “Don’t worry I’m working on an album! Here’s something meanwhile.”

Eminem
Eminem has promised a new album and has also dropped new track Campaign Speech (Jack Plunkett/AP/PA Images)

Lyrics in Campaign Speech include an angry attack at Republican candidate Trump.

He raps: “Consider me a dangerous man, but you should be afraid of this dang candidate. You say Trump don’t kiss ass like a puppet? ’cause he runs his campaign with his own cash for the funding?

“And that’s what you wanted? A fuckin’ loose cannon who’s blunt with his hand on the button, who doesn’t have to answer to no one? Great idea!”

Another assault comes from Eminem towards the supporters of Trump as he raps: “Run the faucet, I’m a dunk a bunch of Trump supporters underwater. Em flows at one point over minimalist swabs of synth. Snuck up on ‘em in Ray-Bans in a grey van with a spray tan.”

Part of the lengthy and musically minimal track references George Zimmerman, the former neighbourhood watch volunteer who shot dead unarmed black teenager Martin in a 2012 confrontation.

Donald Trump
Eminem raps about Donald Trump (Evan Vucci/AP/PA Images)

The song includes a mention of the police involved in Martin’s death and also the death of Eric Garner, a black man who died after being placed in a hold by white police officer Daniel Pantaleo in 2014.

Eminem’s last record was The Marshall Mathers LP 2 in 2013, his eighth studio album.

The hip-hop performer, whose hits have included Stan and My Name Is, has yet to reveal more details of his forthcoming effort.