THE atmosphere, say police sources, was “toxic”. Edinburgh’s two big football teams clashed on Wednesday night. So too did some of their fans.

Two hours after the final whistle at Tynecastle, where Hearts was hosting Hibernian, supporters of both clubs met again. Pre-arranged, to fight.

Bernie Higgins has seen all of this before. One of Scotland’s assistant chief constable, he has 30 years service, starting in Glasgow in the bad old days of the 1980s. Is football hooliganism back? “I don’t think it has ever gone away,” he says.

Mr Higgins is not pressing the panic button after a run of nasty games and organised violence between what police now call “risk supporters” rather than “hooligans” or “casuals”.

“Last year there were around a thousand games and five million people attended and we arrested about 300,” he explains. “Football is now safer than it has ever been and frankly is unrecognisable compared with 30 years ago.”

But there is a “but”. “That said,” Mr Higgins adds, choosing his words carefully, “there is this small minority which is intent on causing disorder and seeking outing rival fans to engage in acts of violence. This small minority is having a big impact.”

It is the same everywhere. Across Europe, footballing authorities have two concerns: ultras and pyros.

The first are groups of fans some of whom slip in to violence. The second are the flares and smokebombs which, once seen only on the continent, are appearing in the UK.

Ultras and pyros, Mr Higgins stresses, are not mutually exclusive problems. Flares have police worried. They can burn at a 1000 degrees.

One pyro was thrown at a recent game. It landed in a fan’s hood. So clubs are having to train and equip their stewards as firefighters and brace themselves for the crowd control risks of supporters running from fire.

But what of “risk supporters”? How many are there. Mr Higgins will not be drawn on numbers. But he stresses the problem is far more extensive than just Rangers and Celtic, or Hearts and Hibs.

“We have got 42 senior clubs,” he explains. “Our intelligence tells us that at least 21 or 22 of these have got what you would call a recognised risk element. That is nothing new. That has been the same for a number of years.

“Some risk groups might have fewer than ten members. Others might have up to 150.”

This picture does not come from nowhere. Stories have appeared of police seeking paid informants - covert human intelligence sources - and monitoring phones.

Fans groups have complained. Law enforcement sources are unapologetic. Nobody would moan, they argue, if they were gathering intelligence on other violent criminals.

What police know is helping to keep some of the violence controlled, even with complex foreign threats, sources say. Crucial is understanding that a “risk supporter” is not always a risk. It depends.

For example, Ayr United, now in the championship, has a small group called the Ragazzi. For decades some Ayr fans have had tensions with supporters of League One side Airdrie. In 2002 there was a full-scale pitch invasion. There have been clashes periodically every since. That does not mean that every fixture involving one of the two clubs is high risk.

Speaking more generally, Mr Higgins said. “We have had fans leave the ground at half time and meet in a car park a mile away. Two hours after the Hearts-Hibs game there was a pre-organised fight between the risk supporters.”

Social media, meanwhile, is both being used to generate tensions and amplify their consequences. Hooligans may not be what it was 30 years ago. But we are all seeing it on our phones like never before.

Is football hooliganism really creeping back? Or is it just more visible in an eco-system of tweets and fans’ forum rants? After all, football loyalties and sectarianism have long bled in to Scotland’s deeply polarised political cyberspace. It is no co-incidence that Irishman Neil Lennon, the Hibs manager, was targeted at Tynecastle. “Hang Neil Lennon” was daubed on an Edinburgh wall.

The Scottish Police Federation, the body representing the rank and file officers facing flares and fans’ fights, thinks there is something real happening. Their bosses at Police Scotland, such as Mr Higgins, are less forthright. But their preparations - their intelligence gathering and their detailed match-planning - suggests they are taking no chances.