They clashed with police, who detained around 40 protesters including about 20 who climbed over a fence in an attempt to approach the court