Hadron spectroscopy is one of the main topics within the COMPASS experiment. Three production mechanisms are used to study exotic states and to search for glueballs: diffractive and central production with pions and protons using a liquid hydrogen target and diffraction and Primakoff reactions with pions impinging on nuclear targets. While the main data taking has been performed in 2008 and 2009, where the statistics of previous experiments has been boosted by a factor 10-100, early measurements with diffractive production on nuclear targets in 2004 have confirmed the existence of an exotic state at a mass around 1.6 GeV. In this paper we report on the final analysis of our 2004 data discussing the evidence for the exotic $\pi$(1600) and sh...