That it has progressed to this dangerous point is testament to the power of a nationalist narrative. It unfolded so naturally, older people worried, that the young did not fully understand the risk they were taking.

“You see how it is going to end,” said Mr. Juanico’s mother, Serafina Sabaté, 89.

She said it sharply: Under the fascist government of Francisco Franco, her father was imprisoned for six years for producing fabric for the republican army. She asked her grandson, who was elated about the vote, what he would do if the government sent tanks.

“Look, we have lived through a war,” Ms. Sabaté said, her voice shaking. “If people go to the street, if someone does something against the state, they will jump on him. Anyone who has lived through the war wants these days to pass by.”

The city of Terrassa, an old textile manufacturing center just outside Barcelona, seemed preternaturally calm last week, the sidewalk cafes full and a yearly theater festival underway. Under the surface, however, there was the sense of an approaching collision — one that was days away, and then hours.