SANT BOI DE LLOBREGAT, Spain — Standing in front of his apartment across from barracks occupied by Spain’s national police, Xavi Gomez recounted the dueling protests over Catalonian independence that unfolded on his street the previous night.

He talked about the secessionists who protested recent police violence by laying down flowers and the nationalists who chanted, “Long live Spain.” Then, as he noticed three officers walking out of a gate and under an iron arch with the words “All for the Homeland,” he went quiet.

“You see how they are looking at me?” said Mr. Gomez, 30, as one officer gave him a hard glare and walked away. Out of earshot, he said he suspected the “monsters” were the first wave of shock troops “coming to take over Catalonia.”

“For this reason,” he said, “Sant Boi doesn’t want these people.”

Since the crackdown on Oct. 1 on Catalans voting in an illegal referendum to secede from Spain, many here have come to view the national police officers dispatched from across the country as a potentially occupying force. Supporters view them as the last guarantors of Spanish unity and law and order, lamenting that Catalonia’s autonomous police force, the Mossos d’Esquadra, seemed to have sided with the independence movement.