In this paper we consider horseshoes with homoclinic tangencies inside the limit set. For a class of such maps, we prove the existence of a unique equilibrium state μt, associated to the (non-continuous) potential −tlog Ju. We also prove that the Hausdorff dimension of the limit set, in any open piece of unstable manifold, is the unique number t0 such that the pressure of μt0 is zero. To deal with the discontinuity of the jacobian, we introduce a countable Markov partition adapted to the dynamics, and work with the first return map defined in a rectangle of it.