An endoscopic suturing machine, having a housing with a housing upper part for receiving drives for the stitch-forming tools, a housing shaft adjoining the housing upper part for a receiving device for transmitting the motions generated by the drives to the stitch-forming tools, which have at least one needle bar guided in the housing shaft with a thread-carrying needle and a shuttle cooperating with same for forming stitches. The shuttle is received by a shuttle bar. The needle bar (5) is designed as a hollow body for receiving and guiding the thread. The thread guide elements are arranged between the thread spool 31 receiving the thread reserve and the needle bar (5) and are arranged in relation to the needle bar (5) such that the thread runs essentially in a straight line between the exit from the mounting device (17) and the entry into the needle bar (5).