BARCELONA, Spain — As Spanish leaders and Catalonia’s separatists battle over the fate of the would-be breakaway region, a shadow from the past is looming over the conflict: Francisco Franco, the dictator who held his nation in an iron grip from 1939 to well into the 1970s.

With Catalan leaders exiled and locked behind bars, Catalan media outlets under threat and national police using truncheons to break up last month’s independence referendum, many here in Catalonia say that their repressive history is making an ugly return.

They point to the no-negotiation stance by Prime Minister Mariano Rajoy, who they say has sought to quell separatism not by persuasion but by force and fear. And they say his center-right People’s Party never fully purged itself of its past after having been founded by Franco-era officials.

Rajoy and his allies dismiss the criticism, saying they are democratically elected leaders operating within the bounds of Spain’s constitution. But they, too, have occasionally reached toward the opposite side in their nation’s bitter history. Government spokesman Pablo Casado recently warned that if Catalan President Carles Puigdemont declared independence, he could wind up with a fate similar to a previous Catalan leader during the Spanish Civil War who was executed by firing squad in 1940.

For many people, Rajoy’s takeover of Catalonia last month and the dismissal and imprisonment of its leaders “represented a return to Francoism,” said Pelai Pagès, a historian of the Spanish Civil War at the University of Barcelona. “History is not so far away.”

He said the chilly climate was visible not just in the streets but even in his university classrooms, where he said administrators have pressured him to teach according to their plans, not his.

“I began teaching in the Franco years, and I never have been questioned as much about what I’m teaching as now,” Pagès said.

Bitter memories of Franco’s rule are just underneath the surface in Catalonia, where their language, a cousin to French and Spanish, was banned from schools and people were forced to adopt Spanish given names. Many Catalans hold special contempt for Spain’s national police force, which they see as an heir to Franco’s repression. The group reinforced its negative image during the Oct. 1 independence referendum when its officers plunged into peaceful crowds and beat up elderly voters whose main crime was taking part in a vote that the national government deemed illegal.

Many here say that vestiges of the Franco era never fully went away, even if Spain itself made a transition to democracy in the years after the 1975 death of the man known as “the Generalissimo.” In Germany, a reckoning with its Nazi past has been pursued with such fervor that it has its own multisyllabic word, “Vergangenheitsbewältigung.” In Spain, the Franco era was handled with a “pact of forgetting” that left painful history unsettled.

Franco’s tomb outside Madrid is a place of pilgrimage for those who miss his law-and-order, no-dissent approach to civil life. Inside the capital city, pro-Franco advocates last month successfully stymied an effort by the left-wing mayor of Madrid to rename 52 streets that commemorate Franco-era events and officials. The country is scattered with mass graves from the Franco era, many of them unexcavated and unexamined.

Small groups of far-right activists waving Franco-era flags and throwing fascist salutes have become a very visible fixture on the fringes of pro-independence demonstrations, even though they are just a tiny fraction of the half of Catalans who want to remain joined with Spain.

“We want to make sure we’re present on the street to get across the idea that there is another Catalonia,” said Josip Alsina, the leader of a far-right activist group called Somatemps, or Minutemen, which has staged counterprotests at pro-independence rallies and also marched on Catalonia’s pro-independence regional radio station.

Since the death of Franco, “the state in Madrid has gradually been emptied of its powers, and it has also lost power on an international basis,” said Alsina, a retired high school science teacher, who said he wanted to help rebuild the country as a robust democratic force.

Even more worrisome to those fearful of the Franco past, the country’s top military commander on Thursday wrote that “probably the biggest challenge of our democracy” was the situation in Catalonia.

“Let no one doubt it: We are always prepared when we are called upon to respond,” General Fernando Alejandre wrote in an editorial marking a Spanish military holiday.

Catalans say reminders of the ugly past are everywhere. In a crowded military antiques shop in a leafy Barcelona neighborhood, owner Xavier Andreu said that Franco’s enduring appeal could even be measured through market forces. Busts of the ex-dictator are still manufactured and a popular item in Madrid and elsewhere, he said.

This is what is not a market-mover: Artifacts of the losing, anti-Franco Republican side of the Spanish Civil War, or of the Catalans that were a big part of the fight.

“I used to go to a military fair in Madrid once a year,” Andreu said. “Now I won’t go. I took a Republican flag and people said, ‘That’s a provocation.’ I took a Catalan flag and they wouldn’t let me take it out.”

The ideological split has alienated Andreu from fellow military buffs in the rest of Spain, he said.

“Catalan society thinks that the People’s Party is a carry-over from Franco,” said Andreu, 58, who said that the Spanish authorities tortured him for his Catalan nationalist views during the waning days of the dictatorship.

Right-wing activists revel in the revival of Spanish nationalism that has been the flip side to the independence effort.

“Here in Spain, nationalism is a kind of taboo,” said Jordi de la Fuente, a leader of the anti-immigrant Platform for Catalonia political party. “We think that it was a mistake that patriotism was demonized 40 years ago.”

Several historians said that the finger-pointing about Franco risks misdiagnosing the source of the conflict.

“The real problem is the crisis of the democratic system built after Franco’s death,” said Xavier Casals, a historian at Barcelona’s Blanquerna-Ramon Llull University who focuses on far-right movements. “At this moment in Spanish politics there are no rational messages, just emotional ones.”

Rajoy has embraced the post-Franco constitution as the source of most of his authority as he quells the Catalan breakaway effort. But some say that constitution is overdue for a revision.

The writing of the constitution “was an unequal negotiation in that power was on the side of the ex-Francoists,” said Sebastian Balfour, an emeritus professor of contemporary Spanish studies at the London School of Economics. Anti-Franco forces, including those who wanted more autonomy for Catalonia, had to make most of the compromises, he said.

“I don’t think that we’re seeing the response of an old Francoism in the present,” Balfour said. “What we’re seeing is a sort of repressive constitutionalism: ‘This is the constitution and we’re not negotiating it.’ ”

But some Catalan nationalists say the situation is far less complicated: The Spanish government is using fear tactics, just like in the Franco years.

“They want to alienate the Catalan population from the Spanish government. And they want to impose it through fear,” said Ermengol Gassiot, the head of the Barcelona branch of the hard line CGT trade union. “Given the legal repercussions they hope people will cease to push for independence. This is a return to the strategy employed by the Franco years.”