Although not officially, informally the capital of a kingdom could be considered the population where the Court was established. In this way, Madrid could be considered the capital of Spain since 1561 when Felipe II established his Court there. That yes, with a parenthesis of five years (1601-1606) in which the Duke of Lerma, King Philip III's favorite, moved the Court to Valladolid in the most important urban corruption case in history. Well, before being the capital of Spain, Madrid was the capital of Little Armenia… back in the 14th century.
The Armenian Kingdom of Cilicia (also known as Lesser Armenia or Little Armenia), south of present-day Turkey, was a kingdom formed in the Middle Ages by Armenian refugees fleeing the Seljuk invasion of Armenia. The country was independent from 1078 to 1375. Little Armenia became an important and powerful ally of the European Crusaders, and considered itself the bastion of Christianity in the East. It also acted as a focus of Armenian culture and nationalism, since Greater Armenia, at the foot of the Caucasus, was occupied by the Turks.
For two centuries they maintained their independence thanks to the support of the crusaders, but from the end of the 13th century they had to defend themselves alone from the attack of the “infidels”…. in 1375 the Egyptian mamluks invaded Little Armenia and its king, Leo V , he was captured and taken to Cairo. Having a Christian king in their power, the Mamelukes rubbed their hands with the ransom. León spent seven years sending tearful letters and pleas to the different kingdoms of Christendom to face the rescue. Until Juan I, King of Castile arrived , and decided to pay for the release of his co-religionist -for centuries we have been the champions of Christianity... and the trouble we have gotten into for it-. Already released, León decided to travel to Castile to thank the gesture. In addition, and for that matter, he kept asking… in this case for support to recover the lost kingdom. Although the king of Castile would have liked to be able to satisfy his requests, it could not be. Even so, and so that he could continue to "exercise as king" he appointed him Lord of Madrid, Andújar and Villareal (the current Ciudad Real) and granted him an annual income of 150,000 maravedíes . Leon liked Madrid so much that he settled there and turned Madrid into the capital of Little Armenia.
Leon V
The people and the nobles were not amused about ceasing to belong to Castile to become part of a lost kingdom, in addition to becoming subjects of a foreign king. Faced with the protests, Juan I thought that he had been too generous and forced him to sign a clause that prohibited the sale or transfer of the manors and linked their temporary donation to his own reign (with his death the manors would become Castilians). He tried to win over the people of Madrid by maintaining his privileges and even lowering taxes, but knowing that his possessions could not be passed on to his heirs and that his royal adventure would end with his death, he began a European tour to solicit support from other kings to recover Little Armenia
In Paris, Charles VI of France only had good words… well, in addition to a castle in Saint-Ouen and some income for the expenses of the castle that he added to those that he continued to receive from Castile. Since his French retirement, he kept trying other monarchies without getting anything. On November 29, 1393, Leo V of Little Armenia and Lord of Madrid died in Paris. His remains were buried in the Saint-Denis basilica (Paris)… waiting for someone to take him to his kingdom.