In the meantime , a rival line based at Thebes was reuniting Upper Egypt and a clash between the two rival dynasties was inevitable .
Another line of pharaohs at Thebes was reuniting Upper Egypt and a clash between the two rival dynasties was inevitable .