The king was in Barcelona to help mark the opening of a major international wireless trade fair, called Mobile World Congress, which begins Monday.
Demonstrations against visits to Catalonia by the monarch, who is a symbol of rule from Madrid and who has criticized separatist movements, are common.
But despite the entrenched and confrontational positions, recent developments have raised the possibility that senior officials might find a path to some degree of compromise. Scores turned out for Sunday’s demonstrations — a number far lower that in some protests in recent years.
The Catalan regional president, Pere Aragonès, who supports Catalan independence, is due to meet in Madrid on Tuesday with Spanish Prime Minister Pedro Sánchez. It will be their first encounter since Aragonès became regional chief earlier this year.
The talks come exactly a week after Sánchez’s government pardoned nine Catalan separatists who were in prison because of their attempts to break their region away from Spain.
The pardons were seen as a goodwill gesture by Sánchez as he seeks a breakthrough on an issue that has dogged Spain for decades.
Catalonia’s separatist movement, which is supported by roughly half the 7.5 million residents in the region, wants to create a republic for the wealthy northeast corner of Spain.