History of Andorra
Charlemagne granted Andorra freedom in the 900s in exchange for fighting with him against the Muslim Moors in the Iberian Peninsula. Later, in the 1000s the country was united under joint foreign rulers due to the need for outside protection. Since that time Andorra has almost always been ruled over by joint leaders, generally the Spanish Bishop of Urgell and the ruler of Navarre, which was later transferred to the King of France.
In the early 1800s Napoleon's France took over Andorra and united it with Catalonia (in Spain). However, after the war, Andorra re-gained their freedom.
During World War I Andorra declared war against Germany, but did not fight. After the war, France occupied the country due to domestic disturbances and civil war in Spain, which the French did not want to spill over into Andorra. During World War II Andorra remained neutral.