The Bristol football derby was marred by violence and a pitch invasion.
Mounted police were needed to clear Bristol City fans from the Ashton Gate pitch after the final whistle.
They had taken to the pitch to celebrate their team's 2-1 over Bristol Rovers in the first round of the Johnstone's Paint Trophy.
Avon and Somerset Police said around a dozen people had been arrested as a result of the disturbances and three officers received medical treatment for non-serious injuries.
As well as trouble after the final whistle there were also disturbances in the stands, and police in riot gear and stewards were needed to keep rival fans apart.
Police said the build-up to the game had been peaceful with both sets of fans well-behaved and in good humour.
But as fans began to enter the stadium small isolated pockets of anti-social behaviour broke out in and around the ground.
Police said that known hooligans attached to both clubs were identified and so far around a dozen people have been arrested.
Chief Superintendent Caroline Peters, match commander, said mounted police had assisted stewards in clearing the pitch of supporters, which took a matter of minutes.
"The majority of fans were well behaved and enjoyed the match," she said.
"However there was a small minority who came with the sole intention of trying to spoil the enjoyment for the majority.
"We warned before the match that we would not tolerate any form of anti social behaviour or violence.
"We will now aim to bring the offenders to justice using CCTV coverage and other intelligence and information gathered tonight to bring the offenders to justice."
Tonight's match was the first time in seven years the bitter rivals had faced each other.
Jay Emmanuel-Thomas put the hosts ahead in the 12th minute with a long-range strike.
Rovers equalised just before the hour mark when Mark McChrystal headed in a free-kick.
But Bristol-born Joe Bryan struck an impressive winner to send City through to the second round.
City manager Sean O'Driscoll said afterwards: "It was great up until the final whistle.
"The scenes at the end are disgraceful."