PHARRELL Williams has slapped Donald Trump with a cease-and-desist letter after the president played one of his songs at a political rally hours after a mass shooting at a synagogue.

Hours after the shooting at a Pittsburgh synagogue, which killed 11 people in what is believed to be the deadliest attack on Jews in US history, Mr Trump played Pharrell’s ‘Happy’ during a rally in Indiana.

The US musician has now expressed his anger at the move and issued a cease-and-desist letter through his lawyer.

The note, from Los Angeles-based lawyer Howard King, states: “There was nothing ‘happy’ about the tragedy inflicted upon our country on Saturday and no permission was granted for your use of this song for this purpose.”

Mr King adds that Pharrell has not and will not grant Mr Trump permission to use his music and that use of the song ‘Happy’ is a copyright and trademark infringement.

Mr Trump called the synagogue massacre an “evil anti-Semitic attack” that “is an assault on all of us”.

Robert Gregory Bowers, a 46-year-old lorry driver, is accused of the attack and appeared in court on Monday in a wheelchair and handcuffs.

It is alleged he was shot and wounded during a shootout with police at the Tree of Life Synagogue in Pittsburgh, Pennsylvania. If convicted, Bowers could face the death penalty.

The 11 victims ranged in age from 54 to 97 and included a husband and wife and brothers.

Pharrell is not the first artist to demand President Trump not use their music.

Earlier this month, Prince’s estate warned the president about playing the late pop star’s hit ‘Purple Rain’ at his rallies.

Aerosmith frontman Steven Tyler also filed a cease-and-desist letter after the president played his song ‘Livin’ On The Edge’ at a rally.

The Rolling Stones also took issue with Mr Trump using their music after he played ‘Start Me Up’ at an event.