It was a familiar term in the pre-Islamic era, but became popularized in Ibn Khaldun's Muqaddimah where it is described as the fundamental bond of human society and the basic motive force of history.
No better is the variant of the legend, which we find, at a much later period, in the Muqaddimah of Ibn Khaldun, who tells us that the poets themselves hung up their poems on the Ka'ba (ed. Paris iii. 357).