A method for forming a vertical field-effect transistor comprising the steps of: a) Providing a semiconductor surface, b) Epitaxially growing on the semiconductor surface and perpendicularly thereon a first part of a III-V semiconductor nanostructure, the first part having a top surface, the first part being doped, thereby being electrically conductive and being a source or a drain in the vertical field-effect transistor, c) Covering the first part of the III-V semiconductor nanostructure with a layer of a first material, d) Removing a top portion of the layer of the first material in such a way that its top surface is co-planar with the top surface of the first part of the III-V semiconductor nanostructure, thereby exposing the top surface of the first part of the III-V semiconductor nanostructure, e) Epitaxially growing on the first part of the III-V semiconductor nanostructure a second part of the III-V semiconductor nanostructure, the second part having a top surface, the second part being not doped and being a channel in the vertical field-effect transistor, f) Covering the second part of the III-V semiconductor nanostructure with a layer of a second material different from the first material and selected from a conductive material and a sacrificial material that can be removed selectively with respect to the first material, and g) Removing a top portion of the layer of the second material in such a way that its top surface is co-planar with the top surface of the second part of the III-V semiconductor nanostructure, thereby exposing the top surface of the second part of the III-V semiconductor nanostructure, wherein the method further comprises: - a step d'), after step d) and before step e), of removing a top portion of thickness t1 of the first part of the III-V semiconductor nanostructure, and - a step e'), after step d') and before step f), of removing a top portion of thickness t1 of the layer of the first material. a) Providing a semiconductor surface, b) Epitaxially growing on the semiconductor surface and perpendicularly thereon a first part of a III-V semiconductor nanostructure, the first part having a top surface, the first part being doped, thereby being electrically conductive and being a source or a drain in the vertical field-effect transistor, c) Covering the first part of the III-V semiconductor nanostructure with a layer of a first material, d) Removing a top portion of the layer of the first material in such a way that its top surface is co-planar with the top surface of the first part of the III-V semiconductor nanostructure, thereby exposing the top surface of the first part of the III-V semiconductor nanostructure, e) Epitaxially growing on the first part of the III-V semiconductor nanostructure a second part of the III-V semiconductor nanostructure, the second part having a top surface, the second part being not doped and being a channel in the vertical field-effect transistor, f) Covering the second part of the III-V semiconductor nanostructure with a layer of a second material different from the first material and selected from a conductive material and a sacrificial material that can be removed selectively with respect to the first material, and g) Removing a top portion of the layer of the second material in such a way that its top surface is co-planar with the top surface of the second part of the III-V semiconductor nanostructure, thereby exposing the top surface of the second part of the III-V semiconductor nanostructure, wherein the method further comprises: - a step d'), after step d) and before step e), of removing a top portion of thickness t1 of the first part of the III-V semiconductor nanostructure, and - a step e'), after step d') and before step f), of removing a top portion of thickness t1 of the layer of the first material. - a step d'), after step d) and before step e), of removing a top portion of thickness t1 of the first part of the III-V semiconductor nanostructure, and - a step e'), after step d') and before step f), of removing a top portion of thickness t1 of the layer of the first material.