Method for producing a thread in a workpiece with the following method steps: a) producing a number n ≥ 1 of twisted grooves (22, 24) in a wall of the workpiece surrounding a thread axis, the grooves being produced with a tool which has at least one twisted groove-producing region and at least one twisted thread-producing region (32, 34), either the groove-producing region(s) exclusively producing the grooves, or the thread-producing region(s) additionally reworking or co-producing the groove(s) produced by the groove-producing region(s), or the thread-producing region(s) additionally reworking or co-producing the groove(s) produced by the groove-producing region(s). or the thread-forming area(s) additionally rework(s) or co-produce(s) the groove(s) produced by the groove forming area(s), b) inserting one of the thread-forming areas (32, 34) of the tool, twisted to match the twist of the twisted grooves, into each of the twisted grooves (22, 24) in a twisted insertion movement matching the twist of the associated groove, c) producing the thread in each wall portion region (23, 25) of the wall of the workpiece adjacent to the groove(s) (22, 24) by rotating the tool about the thread axis and simultaneously axially advancing the tool coaxially with the thread axis at an axial feed rate adapted to the rotational speed of the rotary motion and the thread pitch, wherein during the rotation and simultaneous axial advance, each thread-forming portion of the tool engages the associated wall portion and forms an associated portion of a thread and after the rotation again projects into the same groove or another groove in the wall, d) moving each thread-forming area (32, 34) of the tool out of the associated groove (24, 22) in a twisted lead-out motion adapted to the twist of the associated twisted groove. a) producing a number n ≥ 1 of twisted grooves (22, 24) in a wall of the workpiece surrounding a thread axis, the grooves being produced with a tool which has at least one twisted groove-producing region and at least one twisted thread-producing region (32, 34), either the groove-producing region(s) exclusively producing the grooves, or the thread-producing region(s) additionally reworking or co-producing the groove(s) produced by the groove-producing region(s), or the thread-producing region(s) additionally reworking or co-producing the groove(s) produced by the groove-producing region(s). or the thread-forming area(s) additionally rework(s) or co-produce(s) the groove(s) produced by the groove forming area(s), b) inserting one of the thread-forming areas (32, 34) of the tool, twisted to match the twist of the twisted grooves, into each of the twisted grooves (22, 24) in a twisted insertion movement matching the twist of the associated groove, c) producing the thread in each wall portion region (23, 25) of the wall of the workpiece adjacent to the groove(s) (22, 24) by rotating the tool about the thread axis and simultaneously axially advancing the tool coaxially with the thread axis at an axial feed rate adapted to the rotational speed of the rotary motion and the thread pitch, wherein during the rotation and simultaneous axial advance, each thread-forming portion of the tool engages the associated wall portion and forms an associated portion of a thread and after the rotation again projects into the same groove or another groove in the wall, d) moving each thread-forming area (32, 34) of the tool out of the associated groove (24, 22) in a twisted lead-out motion adapted to the twist of the associated twisted groove.