The poem was published in the weekly journal Ittehad on 16 August 1904. Publicly recited by Iqbal the following year at Government College, Lahore, British India (now in Pakistan) it quickly became an anthem of opposition to the British raj. The song, an ode to Hindustan—the land comprising present-day Bangladesh, India and Pakistan, was later published in 1924 in the Urdu book Bang-i-Dara.
The song has remained popular, especially in India. An abridged version is sung and played frequently as a patriotic song and as a marching song of the Indian Armed Forces.
Sare Jahan Se Achha has remained popular in India for nearly a century. Mahatma Gandhi is said to have sung it over a hundred times when he was imprisoned at Yerawada Jail in Pune in the 1930s.