BARCELONA — In a region battling to break away from Spain, pro-independence flags hang from wrought iron balconies. Banners exalt recently sentenced Catalan leaders as “political prisoners” and call for their release. Demonstrators say they are fighting for the democratic right to choose their destiny.

But that is only a partial view of a conflict that has deepened into a painful, region-defining deadlock.

Because in some neighborhoods of Barcelona, the flags disappear almost entirely. So does the sentiment that independence is a cause worth fighting for. As large as the separatist protests have been in recent weeks, just as many Catalans view the movement as tiresome and misguided — a strain of populism that has succeeded only in delivering transit strikes, animosity and Brexit-style confusion about the future of the region.

“For me, leaving Spain is totally unrealistic,” said Pedro Fernandez, 55, a Barcelona bus driver who is in disagreement with his brother over the issue. “When I see the independence movement getting more and more extreme, it pushes me in the opposite direction, and I get more intense in my own beliefs that they are right.”

The protracted bid for Catalan independence — which crested with a unilateral 2017 referendum and a heavy pushback from Spain — is often portrayed as a standoff between this wealthy northeastern region and the rest of the country. But as Catalans again take to the streets ahead of the national vote Sunday, with sometimes violent clashes with police, it is the divisions closer to home that have left the region feeling destabilized — with no clear way out.

“We are living with a lot of conflict, a lot of trouble in Barcelona,” said José Martí, a vice rector at Universitat Pompeu Fabra Barcelona. “And this will only escalate.”

Since the Spanish Supreme Court last month convicted nine Catalan separatist leaders on charges of sedition, re-inflaming the demonstrations, many protesters here have come to believe that their fight for independence also represents something broader: a push against injustice and repression. Some say they feel in step with other movements that have decried corrupted governance, from Hong Kong to Chile. The protesters have torched trash containers and cars, thrown molotov cocktails and on one occasion occupied the airport, disrupting flights to one of the world’s most visited cities.

But opinion polls indicate that a slim majority in this region of 7.5 million people oppose outright independence. That group tends to feel that separatist Catalan leaders have overlooked the complicated questions of how independence would work — whether companies would leave and whether a breakaway nation could remain in the European Union. They also say a split from Spain, given the level of opposition at home, could never be as clean as regional pro-independence politicians portray.

Acting prime minister Pedro Sánchez has used the internal Catalan divisions to his benefit while taking an increasingly tough line with Catalonia. In an op-ed published by numerous outlets last week, Sánchez noted pointedly that separatist leaders won just 48 percent of the votes cast in regional elections, and he accused the region’s president of damaging “peaceful coexistence in Catalonia.”

“Where was the voice and the vote of those Catalans, the majority, who opposed independence?” Sánchez wrote.

In 2018, Sánchez told the Barcelona newspaper La Vanguardia that any solution regarding the region’s future requires “a wide consensus that right now doesn’t exist in Catalonia.”

There is broad disagreement about what might happen next in the region, as politically fragmented Spain approaches its fourth election in four years. The Catalan pro-independence movement has not fizzled, as many across Spain had hoped it might. But it also has not won international support or gained obvious momentum. Some pundits worry that protests could become more violent in the face of the stalemate.

Catalan separatist politicians say there is one way out: holding another referendum, ideally this time with the official backing of the central government — as happened with the defeated independence vote in Scotland in 2014. But Sánchez, a socialist, has shown no interest in greenlighting such a cause, and parties to the right, if they gained power, would not consider it.

Santiago Abascal, the leader of the far-right Vox party, which is expected to make gains on Sunday, said in a debate on Monday that Catalonia is in a state of “permanent coup d’etat.”

Sánchez and Quim Torra, the Catalan regional president who favors independence, have broken off talks.

“We had two meetings, but these negotiations failed,” Torra said in an interview Friday at a Gothic 15th-century palace in Barcelona that serves as the presidential headquarters. Torra blamed Sánchez for the breakdown, saying he had “been scared by the right-wing parties in Spain” that are opposed to dialogue.

Without such a referendum, Torra said, “instability will continue.”

“We haven’t been able to find a better solution than [proceeding] democratically and giving the voice to the people,” he said.

Sunday’s national vote, in which Sánchez’s party is expected to win the most votes but fall short of a majority, is unlikely to change his calculus on Catalonia, experts say. They note that Catalan leaders have only wanted to discuss outright independence — not lesser changes that could expand the region’s autonomy. In the meantime, the two leading pro-independence parties in Catalonia have been fighting one another for regional primacy.

“They promised people independence at a low cost. Now they cannot find a way out,” said José Ignacio Torreblanca, head of the Madrid office of the European Council on Foreign Relations.

But for all the impracticalities that come with leaving, Catalans who favor independence increasingly say that they have lost trust entirely in Spanish leadership. That’s partly because of the Supreme Court decision announced in October, which separatists here felt was a deliberate — and disproportionate — strike against Catalan independence. Nine separatist leaders involved in the 2017 referendum and its run-up were convicted of sedition and given prison terms between nine and 13 years. They were all acquitted on the more serious charge of rebellion.

In interviews, politicians here speak about the imprisoned leaders as a reminder of the risks their movement faces — and the cautions they need to take. Gabriel Rufián, a leader of the separatist Republican Left of Catalonia, said that when his mother calls him, she says hello to the authorities they both believe have tapped his phones. Another pro-independence politician, Laura Borràs, described visiting the prison where most of the sentenced Catalan separatists are held. She was there on the day that one of them, activist Jordi Cuixart, 44, was getting a visit from his wife and 4-day-old son.

“This is one of the days when I felt dizzy,” Borràs said. “This is the main feeling you have: That you are going out [after visiting] and they are staying in. You feel guilty.”

Two weeks after the sentences were announced, university students in the middle of Barcelona began a protest of their own, setting up tents in a city center plaza, draping them in Catalan flags and erecting a sign showing Sánchez that read “Sit and Talk, Coward.” One of the people camping out, Ferran Montserrat, 24, said people had gathered there not just in support of independence, but for other democratic issues, too. But he worried that the separatist movement had gotten stuck, while also taking on an angrier edge.

“Two years ago, you had one million people smiling. That was hope,” Montserrat said. “Now, it’s like kind of a rage.”

Asked whether he knew anybody who opposed independence, he pointed in an unlikely direction — toward a friend who had showed up briefly at the camp to play cards and show solidarity on a cold night.

Ian Dameson, 25, said he had friends in Madrid and felt a connection with the country, not just the region. He spent his summers in the north of Spain. His father is French. Dameson said the pro-independence energy could be better used in other ways, fighting for economic changes or social programs. And besides, he said, an independent Catalonia wouldn’t be so different from Spain.

“All the politicians would still be the same,” he said.

Natàlia Rodríguez contributed to this report.