Additionally, in Japanese Patent Laid-open Publication No. 61-183942, there is described a method for forming a barrier layer which comprises the steps of forming a refractory metal layer by depositing a metal such as Mo, W, Ti or Ta, forming a titanium nitride layer on the refractory metal layer, and heat-treating the metal layer and the titanium nitride layer to thereby form a refractory metal s