This piece commonly known today as "Asturias" is one of my favorites. It was composed in the early 1890's, most likely in London, by a composer named Isaac Manuel Francisco Albéniz y Pascual although most people know him simply as Isaac Albéniz.
The piece was first published in Barcelona in 1892 and was known simply as "Preludio" or "Prelude" in english. It wasn't originally written for the guitar but rather for the piano. It was used, as the name suggests, as a prelude to a three-movement set entitled Chants d' Espagne.
Five years later, both the original publisher Juan Bta. Pujol & Co. along with the Union Musical Española in Madrid, published a five-movement version of the work again using this as the prelude. In 1911, the German publisher Hofmeister published the first "complete" version of an earlier work of Albéniz's, the Suite Española, that he had begun writing in 1886 but had never finished.
The Suite Española was meant to exemplify the wide range of individual musical styles in the Spanish provinces of Aragon, Andalucia, Castile, Catalonia, and northern mining region, Asturias. Yet only four of the movements of the Suite española had ever been published so to make the set "complete" Hofmeister essentially just took four other movements that Isaac Albéniz had written for other sets, changed the names of them and ascribed them to Suite española.
In doing so he also changed the name of Preludio to Asturias Leyenda, "Asturias Legend" in english, and it was used as the fifth movement. Yet the piece is not representative of Asturias province and is rather a fine example of the Malagueñas Flamenco art form of the Andalusia region.
The guitarist Francisco Tárrega was most likely the first one to transcribe the, at that time, Preludio into the guitar form we most commonly know it in today. Yet the true version of it actually can not be fully transcribed because of the piano's wider range of notes. Severino García Fortea corrected some of the impurities of the melody and it was then later corrected into the piece we know today by Andrés Segovia who claimed that Severino was merely a hack.