It was written just before the Six-Day War. After the reunification of Jerusalem, Shemer added a final verse to celebrate the Jewish return to the Old City.