Where did the letter Ñ come from?

As I talked about the Spanish alphabet and, Ñ which is the unique character that the Spanish language has. They added this special letter Ñ to the original Latin alphabet which looks exactly like English alphabet. Then, I thought, how did this magical letter Ñ come to the alphabet?

First of all, the letter Ñ is actually a ligature of nn, which means that nn became a letter ñ, as the letter w was formed from vv. Thus, in Old Spanish, when they yet did not have this letter, they used to spell this letter with double n. Annos instead of años. In order to indicate the duplication of a letter, a lot of other languages started using macrons (eg:ū), despite that, Spanish adapted a mark called virgulilla. Virgulilla is used to on vowels to indicate that nasal letter is omitted after. For example, quan (how) is a Galician-Portuguese word, but in modern Portuguese, it is spelled quão, and you can see the virgulilla on the letter a to indicate that there was a nasal sound after, n in this case. Even though it dropped out in most cases in other languages, Spanish retained virgulilla with its different usage from other languages. Spanish, in particular, the use of virgulilla signifies nasal palatal, which is basically the annunciation of the letter Ñ. So, for not only nn, but also for any letters that have the nasal palatal pronunciation, this letter Ñ started to be used. For instance, the word piña came from a Latin word pinea (pineus) is one of the example. Since the –nea was supposedly pronounced like nn at the time, they also used that letter for this word and many other words that have the palatal nasal sound in it. In other languages including romance languages have the same pronunciation, nasal palatal, although most of them use different letter or letters (ņ, ń, ň, њ etc… and nh, ny, ni, ng etc…)

Next time you see a Spanish word with this letter ñ it might be interesting to see what the original form was like.