The title subsequently passed to Juan Fernández Andeiro (a Galician noble, lover of the Queen), but when King John I of Portugal seized the throne, his Constable, Nuno Álvares Pereira, inherited it.
When the Constable's daughter married the first Duke of Braganza, Count of Ourém became a subsidiary title of the House of Braganza.
In 1483, Fernando II, third Duke of Bragança, was condemned for treason by order of king John II of Portugal. The House of Braganza estates were confiscated and the Condado of Ourém was granted to Pedro de Menezes, 1st Count of Vila Real, grandson of João Afonso Telo, 1st Count of Ourém.
When king Manuel I inherited the Portuguese throne, he restored the Braganzas with all their previous honours, and from then on the County of Ourém was included in the Braganzas' assets.