Prince Ferdinand María was born on 10 May 1884 at the Royal Palace of Madrid. His father was Prince Ludwig Ferdinand of Bavaria, son of
Prince Adalbert of Bavaria and
Infanta Amalia of Spain. His mother was Infanta María de la Paz of Bourbon, daughter of Queen
Isabella II and
King Francisco de Asís. Through his mother, Prince Ferdinand María was a first cousin of King
Alfonso XIII, who was two years younger than him. Through his father, they were first cousins once removed, Prince Ludwig Ferdinand being first cousin of King Alfonso XII. He was baptized at the Royal Palace of Madrid. In 1886, when he was two years old, his aunt the Queen Regent awarded him the Grand Cross of the
Order of Charles III. Shortly after his birth, his parents moved to Bavaria, where his two siblings
Adalbert and
Pilar were born. Prince Ludwig Ferdinand was the only member of the Bavarian Royal Family who always remained on friendly terms with his cousin, King
Ludwig II (with the exception of
Elisabeth, Empress of Austria). When Ludwig II was arrested at Neuschwanstein Castle in 1886, he called Ludwig Ferdinand for help; the latter immediately intended to follow this call, but was prevented from leaving Nymphenburg Palace by his uncle
Luitpold who was about to take over government as the ruling Prince Regent. From 1878 the family resided at Palais Ludwig Ferdinand, their town-house in Munich. He attended the Bavarian War Academy (
Bayerische Kriegsakademie), attaining the rank of Second Lieutenant of Heavy Cavalry in the Bavarian Army. Then, he returned to Spain. ==Marriage and naturalisation==