His direct association with Primo de Rivera led to his being ousted from the monarchy after Primo de Rivera fell in 1930.  
He was king at birth, since his father died during the pregnancy of Maria Cristina.  Parliamentary rule suffered after his assumption of full power in 1902, and numerous attempts were made to assassinate him, like the attempt to kill him and Victoria Eugenia of Battenberg on their wedding day in 1906.  His direct association with Primo de Rivera led to his being ousted from the monarchy after Primo de Rivera fell in 1930.  For 10 points, name this last king of Spain before the ascension of Juan Carlos.
He was king at birth, since his father died during the pregnancy of Maria Cristina.  
Alfonso XIII