With increasing penetration of renewable energy, multi-energy systems constitute an effective mechanism to optimize energy distribution and improve social welfare. However, a centralized operation of the multi-energy system might not be appropriate under the existing energy markets. Therefore, this paper proposes an equilibrium model for improving the operation of the electricity, gas and district heating subsystems of a district or urban area. The proposed model allows each energy subsystem to pursue its own objective (i.e., maximum social welfare), while considering the interconnection with other subsystems. More specifically, this model represents the behavior of each subsystem and reflects the interactions of the multi-energy system in a practical way. This equilibrium problem is formulated as a nonlinear complementarity problem. An illustrative case study is analyzed to show the relevance of the proposed approach.