The ancestors of the European guitar can be traced back as much as 4000 thousand years to an Indo-European origin of stringed instruments then known in central Asia and India. For this reason guitars are distantly related to instruments such as the tanbur and setar, and the sitar. The oldest known iconographic representation of an instrument displaying the essential features of a guitar is a 3,300 year old stone carving of a Hittite bard.
The modern word, guitar, was adopted into English from Spanish guitarra (German Gitarre, French Guitare), loaned from the medieval Andalusian Arabic qitara, itself derived from the Latin cithara, which in turn came from the earlier Greek word kithara, a possible descendant of Old Persian sihtar.
The guitar is descended from the Roman cithara brought by the Romans to Hispania around 40 AD, and further adapted and developed with the arrival of the four-string oud, brought by the Moors after their conquest of Iberia in the 8th century. Elsewhere in Europe, the indigenous six-string Scandinavian lut (lute), had gained in popularity in areas of Viking incursions across the continent. Often depicted in carvings c. 800 AD, the Norse hero Gunther (also known as Gunnar), played a lute with his toes as he lay dying in a snake-pit, in the legend of Siegfried. By 1200 AD, the four string "guitar" had evolved into two types: the guitarra morisca (Moorish guitar) which had a rounded back, wide fingerboard and several soundholes, and the guitarra latina (Latin guitar) which resembled the modern guitar with one soundhole and a narrower neck.
The Spanish vihuela or "viola da mano", a guitar-like instrument of the 15th and 16th centuries is, due to its similarities, is often considered an important influence in the development of the modern guitar. It had lute-style tuning and a guitar-like body. Its construction had as much in common with the modern guitar as with its contemporary four-course renaissance guitar. The vihuela enjoyed only a short period of popularity in Spain and Italy; the last surviving publication of music for the instrument appeared in 1576. It is not clear whether it represented a transitional form or was simply a design that combined features of the Arabic oud and the European lute. In favor of the latter view, the reshaping of the vihuela into a guitar-like form can be seen as a strategy of differentiating the European lute visually from the Moorish oud. Meanwhile, the five string renassance guitar and the baroque guitar enjoyed popularity, especially in Italy and France, and indeed, most of Europe, from the 15th to the 18th centuries.