When Philip II of Portugal (Philip III of Spain) died, he was succeeded by Philip III (and IV of Spain) who had a different approach on Portuguese issues.
The support of the people became apparent almost immediately and soon John, 8th Duke of Braganza, was acclaimed King of Portugal throughout the country as John IV.