But even then, after a few minutes, perhaps half of them turned on their heels and melted back into the city.

Some would return later, and large crowds also filled a small square outside the Catalan government headquarters. At dusk, a smaller group of counterdemonstrators also marched on the offices of the Catalan public radio station to show their support for a unified Spain. As the night wore on, some of them fought with secessionists, and one man was filmed punching another.

Even after nightfall, however, much of Barcelona seemed subdued.

“For now people’s reaction has been to continue with daily life,” said Antoni Segura, a political commentator and a history professor at Barcelona University. “If you compare it to revolutions in the Middle East, where people went out into the streets to express themselves, it’s a very different atmosphere. There is a feeling of: what’s next?”

It was a question that Anna Zaragoza, a 51-year-old civil servant celebrating outside Parliament, did not have an answer to. Ms. Zaragoza described a feeling of relief in the immediate aftermath of the independence declaration. “A lot of tension has gone,” she said. “I felt very oppressed with the lack of democracy. Now I feel relaxed!”

But then she collected herself and pointed at a police helicopter that hovered ominously overhead. It was a reminder, Ms. Zaragoza suggested, of the authoritarian measures that the Spanish government had said it would take to crush the new republic.

A few yards away, other independence supporters were similarly circumspect. “I’m hopeful,” said Aida Gascon, 33. “But euphoric? No. We don’t know exactly how the Spanish government will react.”

Mar Sanfeliu, a 51-year-old economist, had a fair idea — and one that made her fearful, even as she smiled about the declaration of the new republic. The Spanish government “will do whatever it can to avoid independence,” Ms. Sanfeliu said. “I know a lot of people will stay in the streets. But the Spanish government is very strong.”