Is there a reason Portugal didn't become part of Spain?

by fieldcady

Most of the Iberian peninsula merged together via unions of the crowns (royal marriage such that one person becomes monarch of several different kingdoms), eventually becoming modern Spain. Is there a particular reason that Portugal never joined?

It seems that in other areas (like the British isles) the union of crowns process tends to group kingdoms up to natural geographic barriers, or else to result in countries of comparable size. Portugal on a map just screams "natural part of Spain", so I'm wondering if this is just how the cookie crumbled, or a union almost happened, or maybe I'm missing something. Thanks!

scarlet_sage

An existing answer might be a useful starting point. But this is not to discourage further discussion; questions, info, and debate are welcome.

Especially in this case: a number of answers, especially in the FAQed article, are old and diffuse. Any subject-matter experts handy?

The FAQ section on Portugal and Spain on the Iberian peninsula has a link to "How did Portugal remain independant from Spain?" at https://www.reddit.com/r/AskHistorians/comments/17hfbv/how_did_portugal_remain_independant_from_spain/ . /u/intangible-tangerine covers the later situation and has links to other older discussions, and /u/PunchingClouzot touches more on the earlier situation.

But in "How did Portugal survive as a country being surrounded by Spain?", /u/Pteraspidomorphi at https://www.reddit.com/r/AskHistorians/comments/1zz2lc/how_did_portugal_survive_as_a_country_being/cfyfwn1/ has some corrections to previous inaccuracies.

In "Why are Spain and Portugal historical friends? Why haven't they tried eating one another?", anphph at https://www.reddit.com/r/AskHistorians/comments/6i22dp/why_are_spain_and_portugal_historical_friends_why/dj321ky/ has more information about independence and possible unifications.