For arbitrary static spacetimes, it is shown that an equilibrium between a Killing horizon and matter is only possible for some discrete values of the parameter w = p1/ρ, where ρ is the density and p1 is the pressure in the direction normal to the horizon. In the generic situation of a simple (non-extremal) horizon and the slowest possible density decrease near the horizon, this corresponds to w = -1/3, the value known for a gas of disordered cosmic strings. An admixture of 'vacuum matter', characterized by w = -1 and nonzero density at the horizon, is also admitted. This extends the results obtained previously for static, spherically symmetric spacetimes. A new feature as compared to spherical symmetry is that higher order horizons can exist in the absence of vacuum matter if the horizon is a surface of zero curvature, which can occur, e.g., in cylindrically symmetric spacetimes. © 2009 IOP Publishing Ltd.