A method for etching a dielectric layer made of a dielectric material covering at least one top and one side of a three-dimensional structure, said method comprising a deposition of said dielectric layer on the top and the side of the 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 a first plasma based on a chemistry comprising: ∘ at least a first fluorine -based compound and ∘ oxygen said first etching being carried out so as to: ∘ generate an ion bombardment directed mainly in a direction, parallel to said side, ∘ regulate the amount of the at least one first compound to consume all of 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 side and after having consumed the entire thickness of the dielectric layer (14, 14b) located at the top, ∘ form a first protective oxide-based layer at the top of the three-dimensional structure and form a second protective oxide-based layer on an upper portion of the dielectric layer (14, 14f) located on the side, the thickness e50a of the first protective layer being greater than the thickness e60a of the second protective layer, - a second etching directed mainly in the direction parallel to said side, said second etching being configured for: ∘ completely removing the second protective layer while retaining a portion of the thickness e50b of the first protective layer (50a, 50b, 50m) above the top of the structure, said sequence of first and second etchings being repeated until complete removal of the dielectric layer (14, 14f) located on the side of the three-dimensional structure, said method being characterised in that it further comprises, before deposition of the dielectric layer, a formation of an intermediate protective layer based on a protective material different from the dielectric material, the intermediate protective layer being formed so as to completely cover the three-dimensional structure and such that said intermediate protective layer is located between said top and the dielectric layer. - a first etching of the dielectric layer, by a first plasma based on a chemistry comprising: ∘ at least a first fluorine -based compound and ∘ oxygen ∘ at least a first fluorine -based compound and ∘ oxygen ∘ generate an ion bombardment directed mainly in a direction, parallel to said side, ∘ regulate the amount of the at least one first compound to consume all of 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 side and after having consumed the entire thickness of the dielectric layer (14, 14b) located at the top, ∘ form a first protective oxide-based layer at the top of the three-dimensional structure and form a second protective oxide-based layer on an upper portion of the dielectric layer (14, 14f) located on the side, the thickness e50a of the first protective layer being greater than the thickness e60a of the second protective layer, - a second etching directed mainly in the direction parallel to said side, said second etching being configured for: ∘ completely removing the second protective layer while retaining a portion of the thickness e50b of the first protective layer (50a, 50b, 50m) above the top of the structure, ∘ completely removing the second protective layer while retaining a portion of the thickness e50b of the first protective layer (50a, 50b, 50m) above the top of the structure, said sequence of first and second etchings being repeated until complete removal of the dielectric layer (14, 14f) located on the side of the three-dimensional structure, said method being characterised in that it further comprises, before deposition of the dielectric layer, a formation of an intermediate protective layer based on a protective material different from the dielectric material, the intermediate protective layer being formed so as to completely cover the three-dimensional structure and such that said intermediate protective layer is located between said top and the dielectric layer.