A method for etching a dielectric layer covering at least a top and a flank of a three-dimensional structure, said method comprising a plurality of sequences each comprising at least the following successive steps: - a first etching of the dielectric layer, by plasma, using chemistry comprising: o at least a first fluorine-based compound coming from dissociation of at least one compound selected from fluorocarbon compounds CxFz or CxHyFz, x, y and z being non-zero integers, and o at least a second compound selected from SiwCl(2w+2) and SiwF(2w+2), w being non a non-zero integer, o oxygen, said first etching being performed so as to: o generate an ion bombardment mainly directed along a direction parallel to said flank, o regulate the amount of the at least one first compound to consume all said first fluorine-based compound during this first etching so as to interrupt the first etching before consuming the entire thickness of the dielectric layer (14, 14f) located on the flank and after consuming the entire thickness of the dielectric layer (14, 14b) located on the top, o form a first oxide-based protective layer on the top of the three-dimensional structure and form a second oxide-based protective layer on the dielectric layer (14, 14f) located on the flank, a thickness e50a of the first protective layer being greater than a thickness e60a of the second protective layer, - a second etching configured to entirely remove the second protective layer while keeping a portion having a thickness e50b of the first protective layer (50a, 50b, 50m), said sequence of first and second etchings being repeated until the dielectric layer (14, 14f) located on the flank of the three-dimensional structure is completely removed, said method being characterised in that the second etching is performed by hydrogen-based plasma, such as dihydrogen or ammonia. - a first etching of the dielectric layer, by plasma, using chemistry comprising: o at least a first fluorine-based compound coming from dissociation of at least one compound selected from fluorocarbon compounds CxFz or CxHyFz, x, y and z being non-zero integers, and o at least a second compound selected from SiwCl(2w+2) and SiwF(2w+2), w being non a non-zero integer, o oxygen, said first etching being performed so as to: o generate an ion bombardment mainly directed along a direction parallel to said flank, o regulate the amount of the at least one first compound to consume all said first fluorine-based compound during this first etching so as to interrupt the first etching before consuming the entire thickness of the dielectric layer (14, 14f) located on the flank and after consuming the entire thickness of the dielectric layer (14, 14b) located on the top, o form a first oxide-based protective layer on the top of the three-dimensional structure and form a second oxide-based protective layer on the dielectric layer (14, 14f) located on the flank, a thickness e50a of the first protective layer being greater than a thickness e60a of the second protective layer, o at least a first fluorine-based compound coming from dissociation of at least one compound selected from fluorocarbon compounds CxFz or CxHyFz, x, y and z being non-zero integers, and o at least a second compound selected from SiwCl(2w+2) and SiwF(2w+2), w being non a non-zero integer, o oxygen, o generate an ion bombardment mainly directed along a direction parallel to said flank, o regulate the amount of the at least one first compound to consume all said first fluorine-based compound during this first etching so as to interrupt the first etching before consuming the entire thickness of the dielectric layer (14, 14f) located on the flank and after consuming the entire thickness of the dielectric layer (14, 14b) located on the top, o form a first oxide-based protective layer on the top of the three-dimensional structure and form a second oxide-based protective layer on the dielectric layer (14, 14f) located on the flank, a thickness e50a of the first protective layer being greater than a thickness e60a of the second protective layer, - a second etching configured to entirely remove the second protective layer while keeping a portion having a thickness e50b of the first protective layer (50a, 50b, 50m), said sequence of first and second etchings being repeated until the dielectric layer (14, 14f) located on the flank of the three-dimensional structure is completely removed,