Did any other country own Spain?

Spain is an independent country; only Gibraltar is occupied illegally by UK.