On 25 April 1792 , the mayor of Strasbourg requested his guest Rouget de Lisle compose a song `` that will rally our soldiers from all over to defend their homeland that is under threat '' .
It was written by Rouget de Lisle in Strasbourg on April 26 , 1792 .