Shir LaShalom was written by Yaakov Rotblit and set to music by Yair Rosenblum. It was first performed in 1969 by the Infantry Ensemble (להקת הנחל) of the Israel Defense Forces (IDF) as part of its Sinai Infantry Outpost program, during the War of Attrition between Israel and Egypt. It featured the soloist Miri Aloni, who later became a celebrated folk singer and actor. Many of the other members of the ensemble who took part in the recording of the song went on to become well-known figures in the Israeli entertainment scene. Among them was Danny Sanderson, whose electric guitar solo opened the recording.
Rosenblum originally intended the song for the Israeli Navy Ensemble. He sent it to them from his home in London, with the stipulation that he arrange it himself. When the musical director of the Navy Ensemble, Benny Nagari, rejected that condition, Rosenblum passed the song on to the Nahal Infantry Ensemble, with which he had worked some time previously.