A method of manufacturing a semiconductor device by which an insulating tolerance of a porosity film is settled and a wiring reliability is improved without generating any leakage current or the like between adjacent wiring lines, is provided. The method of manufacturing a semiconductor device comprises the steps of forming a porosity film on a semiconductor substrate; forming a recess in which the surface of the semiconductor substrate is exposed at the bottom of the recess in the porosity film; forming a non-porous film so as to cover the inner wall of the recess, and whole surfaces of the porosity film; alternatively eliminating the non-porous film formed at the bottom of the recess, and the non-porous film located on the porosity film by an anisotropic etching; and forming a barrier metal film and a metal film so as to embed the recess. A process performing the anisotropic etching is carried out by an etching gas in which a mixing ratio expressed by formula: (compound gas including ''nitrogen'' + inert gas)/compound gas including ''fluorineis'', set 45 or more, or 100 or less. |