Conversation so far:
why is portugal a separate country from spain
Portugal started as part of the Spanish kingdom of Leon and became self ruled in the XII century after the Treaty of Zamora.

Question: what did the treaty do
Self-contained rewrite: what did the treaty of zamora do