Police detained 13 fans ahead of the fixture between Raith Rovers and Rangers at Easter Road after "running battles" broke out in the Grassmarket area. The fighting reportedly began in the Black Bull pub but spilled on to the street, where witnesses said bottles were thrown.
The disturbance broke out at around 3pm, ahead of the 4.05pm kick-off. One witness tweeted: "Terrible scenes at Grassmarket. Absolutely shocking, horrendous stuff."
There was a heavy police presence before the match, and pictures appeared to show officers "kettling" Rangers supporters at the west end of the Grassmarket.
A spokesman for Police Scotland said: "There was a disturbance prior to the match in the Grassmarket between two groups. Thirteen people were taken to St Leonard's police station."
Another six people were arrested before kick-off at the stadium and one person was arrested nearby.
Raith won the match 1-0.