The term comes from the Italian word nepotismo, which is based on the Latin word nepos (nephew). Since the Middle Ages and until the late 17th century, some Catholic popes and bishops, who had taken vows of chastity and therefore usually had no legitimate offspring of their own, gave their nephews such positions of preference as were often accorded by fathers to sons.
Several popes elevated nephews and other relatives to the cardinalate. Often, such appointments were a means of continuing a papal "dynasty". For instance, Pope Callixtus III, head of the Borgia family, made two of his nephews cardinals; one of them, Rodrigo, later used his position as a cardinal as a stepping stone to the papacy, becoming Pope Alexander VI. Alexander then elevated Alessandro Farnese, his mistress's brother, to cardinal; Farnese would later go on to become Pope Paul III.
Paul III also engaged in nepotism, appointing, for instance, two nephews, aged 14 and 16, as cardinals, as well as making efforts to increase the territories of his illegitimate son Pier Luigi Farnese. The practice was finally limited when Pope Innocent XII issued the bull Romanum decet Pontificem, in 1692. The papal bull prohibited popes in all times from bestowing estates, offices, or revenues on any relative, with the exception that one qualified relative (at most) could be made a cardinal.
The ancient Indian philosopher Valluvar condemned nepotism is both evil and unwise.