"Hail to the Chief" is the official Presidential Anthem of the United States. The song's playing accompanies the appearance of the President of the United States at many public appearances. For major official occasions, the United States Marine Band and other military ensembles are generally the performers, so directives of the United States Department of Defense have, since 1954, been the main basis for according its official status. It is preceded by four ruffles and flourishes when played for the President. The song is also played during a former President's state funeral, though it can also be played even if the funeral is not a state funeral, such as the funeral of Richard Nixon. The song is in the public domain.
Verses from Sir Walter Scott's The Lady of the Lake, including "Hail to the Chief who in triumph advances!" were set to music around 1812 by the songwriter James Sanderson (c. 1769 – c. 1841), a self-taught English violinist and the conductor of the Surrey Theatre, London, who wrote many songs for local theatrical productions during the 1790s and the early years of the 19th century:
Soldier, rest! thy warfare o'er,
Sleep the sleep that knows not breaking,
Dream of battled fields no more,
Days of danger, nights of waking.
Scott's romance was quickly made into unauthorized romantic melodramas. In November 1810, Scott wrote to a friend that The Lady of the Lake was being made into a play by Martin and Reynolds in London and by a Mr. Siddons in Edinburgh. About the same time, Scott received a letter from a friend and army officer who ended his note with a copy of the music of the Boat Song, "Hail to the Chief."
A version of Lady of the Lake debuted in New York May 8, 1812, and "Hail to the Chief" was published in Philadelphia about the same time, as 'March and Chorus in the Dramatic Romance of the Lady of the Lake'. Many parodies appeared, an indication of great popularity.