A method of manufacturing a semiconductor device having a semiconductor substrate, the method comprising: a first step of forming a plurality of first electrically conductive lines (7a-7f) above the semiconductor substrate; a second step of forming an insulating film to cover the plurality of first electrically conductive lines (7a-7f); a third step of forming a plurality of trenches (19a-19f') in the insulating film at a width not larger than a width of the first electrically conductive line (7a-7f), the plurality of trenches (19a-19f') causing part of upper surfaces of the plurality of first electrically conductive lines (7a-7f) to expose; a fourth step of filling the plurality of trenches (19a-19f') with first insulators; a fifth step of forming second electrically conductive lines (13a-13f) on the insulating film and the first insulators so as to intersect the plurality of first electrically conductive lines (7a-7f); a sixth step of removing the first insulators from the respective trenches (19a-19f') after the fifth step; and a seventh step of filling, with second insulators, portions of the plurality of trenches (19a-19f') that do not overlap the second electrically conductive lines (13a-13f) when viewed in a direction perpendicular to a surface of the semiconductor substrate, so as to leave, as gaps, at least some of a plurality of regions (CR1-CR12) where the plurality of first electrically conductive lines (7a-7f) and the second electrically conductive lines (13a-13f) intersect each other in the plurality of trenches (19a-19f'), wherein a width of the gap in a direction along the second electrically conductive line (13a-13f) is not larger than a width of the first electrically conductive line (7a-7f). a first step of forming a plurality of first electrically conductive lines (7a-7f) above the semiconductor substrate; a second step of forming an insulating film to cover the plurality of first electrically conductive lines (7a-7f); a third step of forming a plurality of trenches (19a-19f') in the insulating film at a width not larger than a width of the first electrically conductive line (7a-7f), the plurality of trenches (19a-19f') causing part of upper surfaces of the plurality of first electrically conductive lines (7a-7f) to expose; a fourth step of filling the plurality of trenches (19a-19f') with first insulators; a fifth step of forming second electrically conductive lines (13a-13f) on the insulating film and the first insulators so as to intersect the plurality of first electrically conductive lines (7a-7f); a sixth step of removing the first insulators from the respective trenches (19a-19f') after the fifth step; and a seventh step of filling, with second insulators, portions of the plurality of trenches (19a-19f') that do not overlap the second electrically conductive lines (13a-13f) when viewed in a direction perpendicular to a surface of the semiconductor substrate, so as to leave, as gaps, at least some of a plurality of regions (CR1-CR12) where the plurality of first electrically conductive lines (7a-7f) and the second electrically conductive lines (13a-13f) intersect each other in the plurality of trenches (19a-19f'), wherein a width of the gap in a direction along the second electrically conductive line (13a-13f) is not larger than a width of the first electrically conductive line (7a-7f).