Germany was NEVER part of Spain. However, from 1516/1519 to 1700 they were both ruled by the same dynasty, the Habsburgs (also spelled Hapsburgs). The Spanish king was never German king, with the exception of Charles V (lived 1500-1558, ruled 1516-1556), who was both.