Hundreds of bonfires have flared across Northern Ireland to celebrate the Battle of the Boyne, the victory in 1690 that ushered in Protestant ascendance. Loyalists mark the eve of parades on 12 July, a day so etched in folk memory it is known simply as the Twelfth.

As the pyres burned into Friday morning and marching bands started a boisterous clamour, loyalists in east Belfast had extra reason to celebrate. Some 329 years after King William of Orange routed the Catholic King James II, they had prevailed in their own contemporary battle.

“We won. We lifted the siege,” said Jamie Bryson, a blogger and activist, amid an exultant crowd outside Avoniel leisure centre.

Belfast city council had tried to ban the bonfire, citing concerns over safety and trespassing, but backed down after a tense five-day standoff involving threats and intimidation.

“They were outplayed and outmanoeuvred at every turn,” said Bryson. “The loyalist people of Avoniel and Northern Ireland have won a hugely symbolic victory.” Revellers – children with candyfloss, men and women with beer and union jack regalia – echoed the claim.

There is a different interpretation of the battle of Avoniel: that it was a hollow act of defiance that reinforced a sense that bonfires are now anachronisms, reflecting not political superiority but the marginalisation of a particular strand of Britishness.

A boy with a union jack haircut in east Belfast. Photograph: Rory Carroll/The Guardian

“Thinking you’re winning a victory by having a bonfire in a leisure centre car park – you’re not,” said Peter Shirlow, an authority on loyalism who is head of Irish studies at the University of Liverpool.

The bonfires were as tall as ever – some nearing a hundred feet – but many unionists shunned them as raucous, sectarian, toxic smoke embarrassments, which, said Shirlow, left dwindling bands of loyalists in deprived communities to continue the tradition. “It’s becoming a small rump,” he said.

It is an anxious time for Northern Ireland’s unionists. Catholics will soon outnumber Protestants, according to demographic data. And Brexit is wobbling the UK’s constitutional edifice. Conceivably, within a decade, a majority could vote in a border poll to join a united Ireland, as permitted under the Good Friday agreement.

Some so-called “soft” unionists have expressed openness to quitting the UK if Brexit unravels the economy. Working-class loyalists view the prospect as an abomination. They built ships and fought wars for the empire and defied IRA onslaughts during the Troubles, burnishing a sense of British identity.

While many nationalists feel trampled on by the Democratic Unionist party, many loyalists perceive Sinn Féin ascendance in the mothballing of Stormont, inquests into security force killings and pressure for an Irish language act.

“There’s a perception the other side is winning, a feeling of left-behindness,” said Nicholas Whyte, a visiting professor at Ulster University and director at the consultancy Apco Worldwide.

When Belfast city council banned the Avoniel bonfire, citing health and safety concerns for nearby homes and the fact it was on council property, loyalists saw the hand of Sinn Féin – the council’s biggest party – reaching out to strangle their culture.

“It’s Sinn Féin getting their way all the time and us getting our things taken away,” said Reece Hunter, 16, an apprentice bricklayer who helped pile pallets for the blaze. He feared a slippery slope to Dublin rule. “We’d all have to be Catholics. I couldn’t go out in my Rangers top.”

Janet Ogle, 55, a chef-turned-housekeeper, claimed Sinn Féin used police to harass bonfire builders. “They have the PSNI wrapped around their wee fingers doing their puppet work.”

Janet Ogle, a loyalist near the Avoniel bonfire site in east Belfast. Photograph: Rory Carroll/The Guardian

Loyalists barricaded the leisure centre entrance and sprayed graffiti threatening the “mercenary” contractor tasked with removing the pyre. The contractor, whose name was leaked, quit.

“That’s not, in my view, an appropriate expression of culture,” Gavin Robinson, the DUP MP for east Belfast, told the BBC.

After police warned of UVF violence if the bonfire was removed the council backed down. Avoniel’s loyalists celebrated the lifting of a “siege”. Speakers blasted marching songs and children sported union jack haircuts.

“The republic [of Ireland] tried to remove our bonfire – to rule us – but that will never happen,” said Freda White, 71, a retired carer.

Graffiti warning contractors not to remove pallets for a bonfire in east Belfast. Photograph: Rory Carroll/The Guardian

For Shirlow, author of a 2012 book titled The End of Ulster Loyalism?, the apparent victory masked a wider defeat. “This is a section of unionism that looks around and sees nothing but loss.”

The Avoniel standoff, which seldom mustered more than a few dozen protesters, paled in contrast with huge loyalist mobilisations in the 1980s and 1990s, he said. “It tells us how much has changed.”

Some bonfire organisers have embraced change by no longer burning tyres or Irish tricolours and making the events more family friendly. The fire service reported 40% fewer call-outs compared to last year.

However Newton Emerson, a commentator from a unionist background, said there was a long-term decline in their social acceptability.

“Too little attention is paid to the enormous, organic shift away from Twelfth celebrations by the unionist population,” he wrote in the Irish News. “Perhaps it looks too much like middle-class snobbery, the worst crime imaginable and hence impossible to acknowledge.”