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.
what did the treaty of zamora do
The Treaty of Zamora (5 October 1143) recognized Portuguese independence from the Kingdom of León.
who was involved in the treaty of zamora
Based on the terms of the accord, King Alfonso VII of León recognized the Kingdom of Portugal in the presence of his cousin King Afonso I of Portugal.
was there a battle before the treaty of zamora
The treaty of Zamora came as of a result of the Battle of Valdevez.

Question: who was in the battle
Self-contained rewrite: who was in the battle of valdevez