Herding is often considered as a phenomenon that drives prices of risky assets away from their equilibrium levels. In this paper we study the on-course UK and Australian horse betting markets. These are simple examples of imperfect markets for state-contingent assets. We provide strong evidence of herding behavior and show that the effects of herding are occasionally sufficient to render the markets inefficient even in the weak sense. Furthermore, the results demonstrate that traders with inside information are not always able to arbitrage away the effects of herding.